Add barcode-detector-api-polyfill dependency and update environment variable declarations in SvelteKit project
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
import { TextDecoder } from './common/TextDecoder';
|
||||
import { TextEncoder } from './common/TextEncoder';
|
||||
// Polyfills browser
|
||||
if (typeof window !== 'undefined') {
|
||||
const checkUndefined = key => !(key in window)
|
||||
|| typeof window[key] === 'undefined'
|
||||
|| window[key] === null;
|
||||
if (checkUndefined('TextDecoder'))
|
||||
window['TextDecoder'] = TextDecoder;
|
||||
if (checkUndefined('TextEncoder'))
|
||||
window['TextEncoder'] = TextEncoder;
|
||||
}
|
||||
export { TextDecoder, TextEncoder };
|
||||
//# sourceMappingURL=encoding.js.map
|
||||
Reference in New Issue
Block a user