intial
This commit is contained in:
20
node_modules/.vite/deps_ssr/utils-B9o6NEeQ.js
generated
vendored
Normal file
20
node_modules/.vite/deps_ssr/utils-B9o6NEeQ.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { ar as noop, d as untrack } from "./runtime-DInTlc-h.js";
|
||||
// node_modules/svelte/src/store/utils.js
|
||||
/** @import { Readable } from './public' */
|
||||
/**
|
||||
* @template T
|
||||
* @param {Readable<T> | null | undefined} store
|
||||
* @param {(value: T) => void} run
|
||||
* @param {(value: T) => void} [invalidate]
|
||||
* @returns {() => void}
|
||||
*/
|
||||
function subscribe_to_store(store, run, invalidate) {
|
||||
if (store == null) {
|
||||
run(void 0);
|
||||
if (invalidate) invalidate(void 0);
|
||||
return noop;
|
||||
}
|
||||
const unsub = untrack(() => store.subscribe(run, invalidate));
|
||||
return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
|
||||
}
|
||||
export { subscribe_to_store as t };
|
||||
Reference in New Issue
Block a user