Merge pull request #1 from alena-n/bugfix/297-dialog-default-position

Fix for App crashes when trying to open a file using modal with alrea…
This commit is contained in:
Alena 2020-05-16 21:55:46 +02:00 committed by GitHub
commit 08c05b04e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]);
};