@mcurros2/microm 1.1.373-0 → 1.1.374-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4220,16 +4220,16 @@ parcelRegister("FDJfP", function(module, exports) {
4220
4220
 
4221
4221
  $parcel$export(module.exports, "registerLocalNavigationGuard", function () { return $1e584338fa0eb4d4$export$fa67bd1067d68ee5; });
4222
4222
  $parcel$export(module.exports, "canNavigateLocally", function () { return $1e584338fa0eb4d4$export$e864e3c512d699c1; });
4223
- const $1e584338fa0eb4d4$var$localNavigationGuards = new Set();
4223
+ let $1e584338fa0eb4d4$var$localNavigationGuard = null;
4224
4224
  function $1e584338fa0eb4d4$export$fa67bd1067d68ee5(guard) {
4225
- $1e584338fa0eb4d4$var$localNavigationGuards.add(guard);
4226
- return ()=>$1e584338fa0eb4d4$var$localNavigationGuards.delete(guard);
4225
+ $1e584338fa0eb4d4$var$localNavigationGuard = guard;
4226
+ return ()=>{
4227
+ if ($1e584338fa0eb4d4$var$localNavigationGuard === guard) $1e584338fa0eb4d4$var$localNavigationGuard = null;
4228
+ };
4227
4229
  }
4228
4230
  async function $1e584338fa0eb4d4$export$e864e3c512d699c1(intent) {
4229
- for (const guard of $1e584338fa0eb4d4$var$localNavigationGuards){
4230
- if (!await guard(intent)) return false;
4231
- }
4232
- return true;
4231
+ const guard = $1e584338fa0eb4d4$var$localNavigationGuard;
4232
+ return guard ? await guard(intent) : true;
4233
4233
  }
4234
4234
 
4235
4235
  });