From 7be0278c17a830c83cd73b3270e2a1aca3ed4350 Mon Sep 17 00:00:00 2001 From: pwlin Date: Mon, 24 Jul 2017 15:00:05 +0200 Subject: [PATCH] Setting contentType to an empty string if it is undefined --- www/plugins.FileOpener2.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/plugins.FileOpener2.js b/www/plugins.FileOpener2.js index c5face4..ebe9313 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]); };