From d913b156f8d4aac0e2837b93443d0ee2004285a8 Mon Sep 17 00:00:00 2001 From: shnist Date: Thu, 20 Dec 2018 15:42:49 +0000 Subject: [PATCH] fix: fixed reference bug in open method --- www/plugins.FileOpener2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/plugins.FileOpener2.js b/www/plugins.FileOpener2.js index 7e064c4..a9bc263 100644 --- a/www/plugins.FileOpener2.js +++ b/www/plugins.FileOpener2.js @@ -27,9 +27,9 @@ var exec = require('cordova/exec'); function FileOpener2() {} FileOpener2.prototype.open = function (fileName, contentType, options) { - contentType = contentType || ''; + contentType = contentType || ''; options = options || {}; - exec(callbackContext.success || null, callbackContext.error || null, 'FileOpener2', 'open', [fileName, contentType, false, options.position]); + exec(options.success || null, options.error || null, 'FileOpener2', 'open', [fileName, contentType, false, options.position]); }; FileOpener2.prototype.showOpenWithDialog = function (fileName, contentType, callbackContext) {