Skip to content

Commit

Permalink
Fix beforeDestroy and caller of isOverrideAllowed
Browse files Browse the repository at this point in the history
  • Loading branch information
Quetzacoalt91 committed Nov 13, 2024
1 parent 2840980 commit 2120d06
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions _dev/src/ts/pages/UpdatePageUpdateOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ export default class UpdatePageUpdateOptions extends UpdatePage {
}

public beforeDestroy() {
this.form.removeEventListener('submit', this.onSubmit);
this.form.removeEventListener('change', this.onChange);
try {
this.form.removeEventListener('submit', this.onSubmit);
this.form.removeEventListener('change', this.onChange);
} catch (e) {

Check failure on line 17 in _dev/src/ts/pages/UpdatePageUpdateOptions.ts

View workflow job for this annotation

GitHub Actions / JS linter syntax check

'e' is defined but never used
// Do Nothing, page is likely removed from the DOM already
}
}

private get form(): HTMLFormElement {
Expand Down
4 changes: 2 additions & 2 deletions classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ public function finalizeCoreUpdate(): void
$this->cleanXmlFiles();

if (UpgradeConfiguration::isOverrideAllowed()) {
$this->logger->info($this->container->getTranslator()->trans('Keeping overrides in place'));
} else {
$this->logger->info($this->container->getTranslator()->trans('Disabling overrides'));
$this->disableOverrides();
} else {
$this->logger->info($this->container->getTranslator()->trans('Keeping overrides in place'));
}

$this->updateTheme();
Expand Down

0 comments on commit 2120d06

Please sign in to comment.