From fce69d37130790c88cc20a6eaed9a20ebd25a15f Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Sun, 1 Jan 2023 17:11:49 +0100 Subject: [PATCH] [MainUI] Update autocompletion for new MIME types Reference https://github.com/openhab/openhab-addons/pull/14013. Reference https://github.com/openhab/openhab-addons/pull/14096. Signed-off-by: Florian Hotze --- .../web/src/components/config/controls/script-editor.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/components/config/controls/script-editor.vue b/bundles/org.openhab.ui/web/src/components/config/controls/script-editor.vue index e026461ae6..d248f17f87 100644 --- a/bundles/org.openhab.ui/web/src/components/config/controls/script-editor.vue +++ b/bundles/org.openhab.ui/web/src/components/config/controls/script-editor.vue @@ -231,9 +231,9 @@ export default { this.$oh.api.get('/rest/items').then((data) => { this.$set(this, 'itemsCache', data) }) } const server = new _CodeMirror.TernServer({ - defs: (this.mode.indexOf('version=ECMAScript-202') > 0) ? [EcmascriptDefs, OpenhabJsDefs] : [EcmascriptDefs, NashornDefs], + defs: (this.mode.indexOf('version=ECMAScript-5.1') > 0) ? [EcmascriptDefs, NashornDefs] : [EcmascriptDefs, OpenhabJsDefs], plugins: (this.ternAutocompletionHook) ? { 'openhab-tern-hook': {} } : undefined, - ecmaVersion: (this.mode.indexOf('version=ECMAScript-202') > 0) ? 6 : 5 + ecmaVersion: (this.mode.indexOf('version=ECMAScript-5.1') > 0) ? 5 : 6 }) extraKeys = { 'Ctrl-Space': function (cm) { server.complete(cm) },