Skip to content

Commit

Permalink
[MainUI] Update autocompletion for new MIME types (openhab#1619)
Browse files Browse the repository at this point in the history
Reference openhab/openhab-addons#14013.
Reference openhab/openhab-addons#14096.

Signed-off-by: Florian Hotze <[email protected]>

Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Boris Krivonog <[email protected]>
  • Loading branch information
florian-h05 authored and crnjan committed Jan 17, 2023
1 parent 6a0e7dd commit cd08d80
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) },
Expand Down

0 comments on commit cd08d80

Please sign in to comment.