Update dependency knip to v6 (#33008)
* Update dependency knip to v6 * Make knip happy --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
co-authored by
renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Michael Telatynski
parent
2d3e2fcb70
commit
063e0802f4
@@ -27,13 +27,12 @@ const EffectsOverlay: FunctionComponent<IProps> = ({ roomWidth }) => {
|
||||
if (!name) return null;
|
||||
let effect: ICanvasEffect | null = effectsRef.current.get(name) || null;
|
||||
if (effect === null) {
|
||||
const options = CHAT_EFFECTS.find((e) => e.command === name)?.options;
|
||||
const definition = CHAT_EFFECTS.find((e) => e.command === name)!;
|
||||
try {
|
||||
const { default: Effect } = await import(`../../../effects/${name}`);
|
||||
effect = new Effect(options);
|
||||
effectsRef.current.set(name, effect!);
|
||||
effect = await definition.getRenderer();
|
||||
effectsRef.current.set(name, effect);
|
||||
} catch (err) {
|
||||
logger.warn(`Unable to load effect module at '../../../effects/${name}.`, err);
|
||||
logger.warn(`Unable to run effect module.`, err);
|
||||
}
|
||||
}
|
||||
return effect;
|
||||
|
||||
Reference in New Issue
Block a user