Fix bug and call the hook with the tweak key
This commit is contained in:
parent
9ffa1cee06
commit
3527286c7f
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) {
|
||||||
|
prevented = Hooks.call(`${__ID__}.preventSetting`, key);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!prevented) {
|
if (!prevented) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue