We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 01e491b + 9bc17bf commit a831aeeCopy full SHA for a831aee
lib/utils.js
@@ -1,5 +1,5 @@
1
// add support for cordova-plugin-file
2
-const moduleMapper = typeof window !== 'undefined' && window.cordova && window.cordova.require('cordova/modulemapper');
+const moduleMapper = typeof window !== 'undefined' && window.cordova && window.cordova.require && window.cordova.require('cordova/modulemapper');
3
export const CustomFile = (moduleMapper && moduleMapper.getOriginalSymbol(window, 'File')) || File;
4
export const CustomFileReader = (moduleMapper && moduleMapper.getOriginalSymbol(window, 'FileReader')) || FileReader;
5
/**
@@ -277,4 +277,4 @@ export function cleanupMemory(canvas) {
277
canvas.width = 0;
278
canvas.height = 0;
279
canvas = null;
280
-}
+}
0 commit comments