Skip to content

Commit

Permalink
fix: make lib loadable on ie9 (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh committed Aug 10, 2021
1 parent 98f9344 commit a618d14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
@@ -1,7 +1,7 @@
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';

// Use a lookup table to find the index.
const lookup = new Uint8Array(256);
const lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
for (let i = 0; i < chars.length; i++) {
lookup[chars.charCodeAt(i)] = i;
}
Expand Down

0 comments on commit a618d14

Please sign in to comment.