From ccf7229f42bf051a458c99ddf51bc512e8aabafd Mon Sep 17 00:00:00 2001 From: Alena Date: Sat, 16 May 2020 21:47:19 +0200 Subject: [PATCH] Fix for App crashes when trying to open a file using modal with already installed app. --- www/plugins.FileOpener2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/plugins.FileOpener2.js b/www/plugins.FileOpener2.js index 693511b..5254c58 100644 --- a/www/plugins.FileOpener2.js +++ b/www/plugins.FileOpener2.js @@ -34,7 +34,7 @@ FileOpener2.prototype.open = function (fileName, contentType, callbackContext) { FileOpener2.prototype.showOpenWithDialog = function (fileName, contentType, callbackContext) { contentType = contentType || ''; - callbackContext = callbackContext || {}; + callbackContext = {...callbackContext, position: callbackContext.position ? callbackContext.position : [0, 0]}; exec(callbackContext.success || null, callbackContext.error || null, 'FileOpener2', 'open', [fileName, contentType, false, callbackContext.position]); };