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 b23e0a9 commit db34813Copy full SHA for db34813
src/modules/Instabug.ts
@@ -137,7 +137,8 @@ export const init = async (config: InstabugConfig) => {
137
* Handles app state changes and updates APM network flags if necessary.
138
*/
139
const handleAppStateChange = async (nextAppState: AppStateStatus, config: InstabugConfig) => {
140
- if (_currentAppState.match(/inactive|background/) && nextAppState === 'active') {
+ // Checks if the app has come to the foreground
141
+ if (['inactive', 'background'].includes(_currentAppState) && nextAppState === 'active') {
142
// Update the APM network flags
143
const updatedFlags = await fetchApmNetworkFlags();
144
const isUpdated = setApmNetworkFlagsIfChanged(updatedFlags);
0 commit comments