1
0

Language facet broke again

This commit is contained in:
Zef Hemel 2022-09-14 10:43:42 +02:00
parent 1195842724
commit e6851b391e
2 changed files with 3 additions and 7 deletions

View File

@ -60,6 +60,8 @@ if (localStorage.getItem("disable_sw") !== "true") {
"No launching service worker (not present, maybe because not running on localhost or over SSL)"
);
}
} else {
console.log("Service worker disabled via disable_sw");
}
// }

View File

@ -76,8 +76,6 @@ const saveInterval = 1000;
// Monkey patching the languageDataAt, somehow the languageData facet is not set
// properly, no idea why
let _languageFacetsCache: any;
// TODO: Remove at some point
EditorState.prototype.languageDataAt = function (
name: string,
@ -91,11 +89,7 @@ EditorState.prototype.languageDataAt = function (
let providerResult = provider(this, pos, side);
if (!providerResult) {
// console.log("Empty provider result");
providerResult = _languageFacetsCache;
// continue;
} else {
// console.log("Provider result", providerResult);
_languageFacetsCache = providerResult.slice();
continue;
}
for (let result of providerResult) {
if (Object.prototype.hasOwnProperty.call(result, name))