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 2a2d4f3 commit 3fa5826Copy full SHA for 3fa5826
src/init.js
@@ -1,7 +1,7 @@
1
const AV = require('./av');
2
const AppRouter = require('./app-router');
3
const { isNullOrUndefined } = require('./utils');
4
-const { extend, isObject } = require('underscore');
+const { extend, isObject, isEmpty } = require('underscore');
5
6
const isCNApp = appId => appId.slice(-9) !== '-MdYXbMMI';
7
@@ -76,7 +76,7 @@ AV.init = function init(options, ...params) {
76
if (process.env.CLIENT_PLATFORM && masterKey)
77
console.warn('MasterKey is not supposed to be used in browser.');
78
if (isCNApp(appId)) {
79
- if (!serverURLs) {
+ if (!serverURLs && isEmpty(AV._config.serverURLs)) {
80
throw new TypeError(
81
`serverURLs option is required for apps from CN region`
82
);
0 commit comments