mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Avoid loading the Grist frontend app more than once.
Summary: This can happen thanks to some badly-behaved extensions (e.g. lingvanex), and results in errors such as "Cannot redefine property: isInput". Test Plan: Tested manually that Grist fails to load in Chrome with Lingvanex extension, and loads successfully with this change. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3013
This commit is contained in:
parent
0717ee627e
commit
b716a57e31
@ -1,5 +1,13 @@
|
||||
/* global $, window */
|
||||
|
||||
// This is the entry point into loading the whole of Grist frontend application. Some extensions
|
||||
// attempt to load it more than once (e.g. "Lingvanex"). This leads to duplicated work and errors.
|
||||
// At least some of such interference can be neutralized by simply ignoring repeated loads.
|
||||
if (window._gristAppLoaded) {
|
||||
return;
|
||||
}
|
||||
window._gristAppLoaded = true;
|
||||
|
||||
const {App} = require('./ui/App');
|
||||
|
||||
// Disable longStackTraces, which seem to be enabled in the browser by default.
|
||||
|
Loading…
Reference in New Issue
Block a user