Skip to content

Commit

Permalink
maybe do report errors again
Browse files Browse the repository at this point in the history
  • Loading branch information
jtbandes committed Dec 19, 2024
1 parent 08f2e3f commit 6ca874c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/FontManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ export class FontManager extends EventDispatcher<EventMap> {

update(newChars: string): void {
if (this.alphabet.length > MAX_CHARS) {
// we would have already reported an error; just bail this time
this.dispatchEvent({
type: "error",
error: new Error(
`Exceeded maximum unique characters: ${this.alphabet.length} > ${MAX_CHARS}`,
),
});
return;
}
let needsUpdate = false;
Expand Down

0 comments on commit 6ca874c

Please sign in to comment.