Skip to content

Commit

Permalink
Replace deprecated substr method with substring method (#1822)
Browse files Browse the repository at this point in the history
Co-authored-by: Mathieu Leplatre <mathieu@mozilla.com>
  • Loading branch information
kirtan-desai and leplatrem committed Oct 3, 2022
1 parent 2861b61 commit 72164d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ export function parseDataURL(dataURL: string): TypedDataURL {
const regex = /^data:(.*);base64,(.*)/;
const match = dataURL.match(regex);
if (!match) {
throw new Error(`Invalid data-url: ${String(dataURL).substr(0, 32)}...`);
throw new Error(`Invalid data-url: ${String(dataURL).substring(0, 32)}...`);
}
const props = match[1];
const base64 = match[2];
Expand Down

0 comments on commit 72164d3

Please sign in to comment.