From 289176535e8ab7e83d4f6676f1b886b8f48caad0 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Tue, 17 Dec 2024 16:14:23 +0100 Subject: [PATCH] Fix scripting add-on availability check for old JS Scripting MIME type (#2928) Regression from #2743. Signed-off-by: Florian Hotze (cherry picked from commit 511b9493bbf53cc083a44a1123139e6c7fa86cfd) --- .../web/src/components/rule/module-wizard-mixin.js | 1 + .../web/src/pages/settings/rules/script/script-edit.vue | 1 + 2 files changed, 2 insertions(+) diff --git a/bundles/org.openhab.ui/web/src/components/rule/module-wizard-mixin.js b/bundles/org.openhab.ui/web/src/components/rule/module-wizard-mixin.js index c12a09cb1c..1288743f09 100644 --- a/bundles/org.openhab.ui/web/src/components/rule/module-wizard-mixin.js +++ b/bundles/org.openhab.ui/web/src/components/rule/module-wizard-mixin.js @@ -74,6 +74,7 @@ export default { }) }, isMimeTypeAvailable (mimeType) { + if (mimeType === 'application/javascript;version=ECMAScript-2021') mimeType = 'application/javascript' return this.languages.map(l => l.contentType).includes(mimeType) } } diff --git a/bundles/org.openhab.ui/web/src/pages/settings/rules/script/script-edit.vue b/bundles/org.openhab.ui/web/src/pages/settings/rules/script/script-edit.vue index 1c39db5fa7..f87c1a818b 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/rules/script/script-edit.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/rules/script/script-edit.vue @@ -392,6 +392,7 @@ export default { }) }, isMimeTypeAvailable (mimeType) { + if (mimeType === 'application/javascript;version=ECMAScript-2021') mimeType = 'application/javascript' return this.languages.map(l => l.contentType).includes(mimeType) }, mimeTypeDescription (mode) {