File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,8 @@ module.exports = function(AV) {
9090 */
9191 AV . initialize = function ( applicationId , applicationKey , masterKey ) {
9292 if ( masterKey ) {
93- throw "AV.initialize() was passed a Master Key, which is only " +
94- "allowed from within Node.js." ;
93+ throw new Error ( "AV.initialize() was passed a Master Key, which is only " +
94+ "allowed from within Node.js." ) ;
9595 }
9696 AV . _initialize ( applicationId , applicationKey , masterKey ) ;
9797 } ;
@@ -103,7 +103,10 @@ module.exports = function(AV) {
103103 * @param {String } applicationKey Your AV Application Key
104104 */
105105 AV . _initialize = function ( applicationId , applicationKey , masterKey ) {
106- if ( AV . applicationId !== undefined ) {
106+ if ( AV . applicationId !== undefined &&
107+ applicationId !== AV . applicationId &&
108+ applicationKey !== AV . applicationKey &&
109+ masterKey !== AV . masterKey ) {
107110 console . warn ( 'AVOSCloud SDK is already initialized, please don\'t reinitialize it.' ) ;
108111 }
109112 AV . applicationId = applicationId ;
You can’t perform that action at this time.
0 commit comments