Load the presenter client only on presenter entry
This commit is contained in:
@@ -111,7 +111,8 @@
|
||||
proxy(name, methods, globalName) {
|
||||
return Object.fromEntries(methods.map(method => [method, async (...args) => {
|
||||
await load(name);
|
||||
const target = root[globalName || name.split(':')[1]];
|
||||
const key = globalName || name.split(':')[1];
|
||||
const target = root.YT?.[key] || root[key];
|
||||
if (typeof target?.[method] !== 'function') throw new Error('Missing lazy method: ' + method);
|
||||
return target[method](...args);
|
||||
}]));
|
||||
|
||||
Reference in New Issue
Block a user