File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,11 @@ AV.init = function init(options, ...params) {
9090 AV . setProduction ( production ) ;
9191 if ( typeof disableCurrentUser !== 'undefined' )
9292 AV . _config . disableCurrentUser = disableCurrentUser ;
93- AV . _appRouter = new AppRouter ( AV ) ;
9493 const disableAppRouter =
9594 _disableAppRouter || typeof serverURLs !== 'undefined' ;
95+ if ( ! disableAppRouter ) {
96+ AV . _appRouter = new AppRouter ( AV ) ;
97+ }
9698 AV . _setServerURLs (
9799 extend (
98100 { } ,
Original file line number Diff line number Diff line change @@ -123,7 +123,9 @@ const request = ({
123123 if ( ! ( AV . applicationId && ( AV . applicationKey || AV . masterKey ) ) ) {
124124 throw new Error ( 'Not initialized' ) ;
125125 }
126- AV . _appRouter . refresh ( ) ;
126+ if ( AV . _appRouter ) {
127+ AV . _appRouter . refresh ( ) ;
128+ }
127129 const { requestTimeout : timeout } = AV . _config ;
128130 const url = createApiUrl ( { service, path, version } ) ;
129131 return setHeaders ( authOptions , signKey ) . then ( headers =>
You can’t perform that action at this time.
0 commit comments