diff --git a/native/navigation/overlay-navigator.react.js b/native/navigation/overlay-navigator.react.js --- a/native/navigation/overlay-navigator.react.js +++ b/native/navigation/overlay-navigator.react.js @@ -286,10 +286,9 @@ const newVisibleOverlays = curVisibleOverlays.filter( overlay => overlay.routeKey !== key, ); - invariant( - newVisibleOverlays.length < curVisibleOverlays.length, - `could not find ${key} in visibleOverlays`, - ); + if (newVisibleOverlays.length > curVisibleOverlays.length) { + return; + } visibleOverlaysRef.current = newVisibleOverlays; setSceneData(curSceneData => { const newSceneData = {};