You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'You are currently in the development environment and have not enabled debug mode. The hot update check will not be performed. If you need to debug hot updates in the development environment, please set debug to true in the client.',
162
+
);
163
+
returnfalse;
164
+
}
165
+
returntrue;
166
+
};
153
167
markSuccess=()=>{
154
168
if(Pushy.marked||__DEV__||!isFirstTime){
155
169
return;
@@ -159,10 +173,7 @@ export class Pushy {
159
173
this.report({type: 'markSuccess'});
160
174
};
161
175
switchVersion=async(hash: string)=>{
162
-
if(__DEV__){
163
-
console.warn(
164
-
'switchVersion() is not supported in development environment; no action taken.',
'switchVersionLater() is not supported in development environment; no action taken.',
179
-
);
187
+
if(!assertDev('switchVersionLater()')){
180
188
return;
181
189
}
182
190
if(Pushy.assertHash(hash)){
@@ -185,14 +193,10 @@ export class Pushy {
185
193
}
186
194
};
187
195
checkUpdate=async(extra?: Record<string,any>)=>{
188
-
if(__DEV__&&!this.options.debug){
189
-
console.info(
190
-
'You are currently in the development environment and have not enabled debug mode. The hot update check will not be performed. If you need to debug hot updates in the development environment, please set debug to true in the client.',
191
-
);
196
+
if(!this.assertDebug()){
192
197
return;
193
198
}
194
-
if(Platform.OS==='web'){
195
-
console.warn('web platform does not support hot update check');
0 commit comments