diff --git a/www/plugins.FileOpener2.js b/www/plugins.FileOpener2.js index eb75211..bac1a50 100644 --- a/www/plugins.FileOpener2.js +++ b/www/plugins.FileOpener2.js @@ -27,11 +27,13 @@ var exec = require('cordova/exec'); function FileOpener2() {} FileOpener2.prototype.open = function (fileName, contentType, callbackContext) { + contentType = contentType || ''; callbackContext = callbackContext || {}; exec(callbackContext.success || null, callbackContext.error || null, 'FileOpener2', 'open', [fileName, contentType]); }; FileOpener2.prototype.showOpenWithDialog = function (fileName, contentType, callbackContext) { + contentType = contentType || ''; callbackContext = callbackContext || {}; exec(callbackContext.success || null, callbackContext.error || null, 'FileOpener2', 'open', [fileName, contentType, false]); };