mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 10:01:39 -05:00
commandline_frame.ts: Fix exception thrown because of 'tri' not existing
The commandline_frame document does not have a window.tri object. This makes the commandline throw an exception on page load. We fix this by using 'window.tri || {}' in order to avoid to avoid issues should 'window.tri' be defined in the command line one day.
This commit is contained in:
parent
8744d73423
commit
f51e08d9eb
1 changed files with 1 additions and 1 deletions
|
@ -399,6 +399,6 @@ Messaging.addListener("commandline_frame", Messaging.attributeCaller(SELF))
|
|||
// object since there's apparently a bug that causes performance
|
||||
// observers to be GC'd even if they're still the target of a
|
||||
// callback.
|
||||
;(window as any).tri = Object.assign(window.tri, {
|
||||
;(window as any).tri = Object.assign(window.tri || {}, {
|
||||
perfObserver: perf.listenForCounters(),
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue