Fix potential init bug in js interface

This commit is contained in:
Sebastián Katzer 2017-01-30 09:37:21 +01:00
parent 891fa51cb2
commit 4b31ee3097

View File

@ -339,9 +339,13 @@ exports.mergeWithDefaults = function (options) {
*/ */
exports.pluginInitialize = function () { exports.pluginInitialize = function () {
this._isAndroid = device.platform.match(/^android|amazon/i) !== null; this._isAndroid = device.platform.match(/^android|amazon/i) !== null;
this._isEnabled = this._isEnabled || device.platform == 'browser';
this._isActive = this._isActive || device.platform == 'browser';
this.setDefaults({}); this.setDefaults({});
if (device.platform == 'browser' || window.webkit !== undefined) {
this.enable();
}
this._isActive = this._isActive || device.platform == 'browser';
}; };
@ -354,7 +358,7 @@ exports.pluginInitialize = function () {
* *
* Flag indicates if the mode is enabled. * Flag indicates if the mode is enabled.
*/ */
exports._isEnabled = window.webkit !== undefined; exports._isEnabled = false;
/** /**
* @private * @private