mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1060086 - Get rid of error message 'TypeError: command.state.offChange is not a function' in mochitest-dt. r=jwalker
This commit is contained in:
parent
7f93484c48
commit
05c44ed969
@ -166,7 +166,9 @@ let CommandUtils = {
|
||||
command.state.onChange(target, onChange);
|
||||
onChange("", { target: target });
|
||||
document.defaultView.addEventListener("unload", () => {
|
||||
command.state.offChange(target, onChange);
|
||||
if (command.state.offChange) {
|
||||
command.state.offChange(target, onChange);
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user