Move the tweak prevention into a helper function and rename the module hooks w/ compatibility code #26
1 changed files with 3 additions and 1 deletions
|
|
@ -11,7 +11,9 @@ export function preventTweakRegistration(key, invasive = false) {
|
||||||
`The hook "${__ID__}.preventSetting" has been renamed "${__ID__}.registerTweak".`,
|
`The hook "${__ID__}.preventSetting" has been renamed "${__ID__}.registerTweak".`,
|
||||||
{ since: `v1.2.0`, until: `v2.0.0`, stack: false, once: true },
|
{ since: `v1.2.0`, until: `v2.0.0`, stack: false, once: true },
|
||||||
);
|
);
|
||||||
prevented &&= Hooks.call(`${__ID__}.preventSetting`);
|
if (prevented !== false) {
|
||||||
|
Oliver marked this conversation as resolved
Outdated
|
|||||||
|
prevented = Hooks.call(`${__ID__}.preventSetting`, key);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!prevented) {
|
if (!prevented) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue
This needs to be updated because it won't call this hook if
oft.preRegisterTweakis allowing the tweak to be registered