mirror of
https://github.com/koush/scrypted.git
synced 2026-02-03 14:13:28 +00:00
webrtc: fix typing and variable scope
This commit is contained in:
@@ -52,7 +52,12 @@ export function createZygote<T>(options?: ForkOptions): Zygote<T> {
|
||||
}
|
||||
|
||||
const gen = next();
|
||||
return () => gen.next().value as PluginFork<T>;
|
||||
return () => {
|
||||
const ret = gen.next();
|
||||
if (ret.done || !ret.value)
|
||||
throw new Error('Zygote exhausted');
|
||||
return ret.value;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user