Skip to content

Commit

Permalink
docs(core-utils): Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Oct 3, 2023
1 parent 0cd4bd8 commit 8a00e1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core-utils/src/itinerary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ export function getTextWidth(text: string, font = "22px Arial"): number {
// Create custom type for function including reused canvas object
type GetTextWidth = typeof getTextWidth & { canvas: HTMLCanvasElement };

// re-use canvas object for better performance
// reuse canvas object for better performance
const canvas =
(getTextWidth as GetTextWidth).canvas ||
((getTextWidth as GetTextWidth).canvas = document.createElement("canvas"));
Expand Down

0 comments on commit 8a00e1b

Please sign in to comment.