Skip to content

Commit

Permalink
[MainUI] Update autocompletion for new MIME types
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]>
  • Loading branch information
florian-h05 committed Jan 1, 2023
1 parent d6390d0 commit fce69d3
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 fce69d3

Please sign in to comment.