We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93f707e commit 3e7f57aCopy full SHA for 3e7f57a
src/init.js
@@ -87,10 +87,16 @@ AV.init = function init(options, ...params) {
87
);
88
}
89
90
+ if (appId !== AV._config.applicationId) {
91
+ // overwrite all keys when reinitializing as a new app
92
+ AV._config.masterKey = masterKey;
93
+ AV._config.hookKey = hookKey;
94
+ } else {
95
+ if (masterKey) AV._config.masterKey = masterKey;
96
+ if (hookKey) AV._config.hookKey = hookKey;
97
+ }
98
AV._config.applicationId = appId;
99
AV._config.applicationKey = appKey;
- AV._config.masterKey = masterKey;
- AV._config.hookKey = hookKey;
100
AV.setProduction(production);
101
if (typeof disableCurrentUser !== 'undefined')
102
AV._config.disableCurrentUser = disableCurrentUser;
0 commit comments