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".`,
|
||||
{ since: `v1.2.0`, until: `v2.0.0`, stack: false, once: true },
|
||||
);
|
||||
prevented &&= Hooks.call(`${__ID__}.preventSetting`);
|
||||
if (prevented !== false) {
|
||||
prevented = Hooks.call(`${__ID__}.preventSetting`, key);
|
||||
};
|
||||
};
|
||||
|
||||
if (!prevented) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue