fix: allow plugins when embedding mattermost (#30739)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
77bf047c55
Коммит
1140ee17d6
@@ -62,11 +62,6 @@ window.plugins = {};
|
|||||||
// During the beta, plugins manipulated the global window.plugins data structure directly. This
|
// During the beta, plugins manipulated the global window.plugins data structure directly. This
|
||||||
// remains possible, but is officially deprecated and may be removed in a future release.
|
// remains possible, but is officially deprecated and may be removed in a future release.
|
||||||
function registerPlugin(id: string, plugin: Plugin): void {
|
function registerPlugin(id: string, plugin: Plugin): void {
|
||||||
// Don't register plugins if MMEMBED cookie is set
|
|
||||||
if (document.cookie.includes('MMEMBED=1')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const oldPlugin = window.plugins[id];
|
const oldPlugin = window.plugins[id];
|
||||||
if (oldPlugin && oldPlugin.uninitialize) {
|
if (oldPlugin && oldPlugin.uninitialize) {
|
||||||
oldPlugin.uninitialize();
|
oldPlugin.uninitialize();
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user