decord/source/__polyfill/01xxx/module_1518.js
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

33 lines
1.1 KiB
JavaScript

// Module ID: 1518
// Function ID: 1519
// Dependencies: [19, 21]
// Exports: EnsureSingleNavigator
// Module 1518
import noop from "module_19" /* 19 */;
const jsx = fn(21).jsx;
const context = noop.createContext(undefined);
export const SingleNavigatorContext = context;
export const EnsureSingleNavigator = function EnsureSingleNavigator(children) {
closure_0 = noop.useRef(undefined);
return <context.Provider value={noop.useMemo(() => ({
register(current) {
current = ref.current;
if (undefined !== current) {
if (current !== current) {
const _Error = Error;
const error = new Error("Another navigator is already registered for this container. You likely have multiple navigators under a single \"NavigationContainer\" or \"Screen\". Make sure each navigator is under a separate \"Screen\" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.");
throw error;
}
}
ref.current = current;
},
unregister(arg0) {
if (arg0 === ref.current) {
tmp.current = undefined;
}
}
}), [])}>{arg0.children}</context.Provider>;
};