diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2018-03-07 17:45:42 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2018-03-07 17:45:42 +0000 |
commit | 87e163137cdfcaf7b0aab110dc776e7629402214 (patch) | |
tree | 58587115cd47a7e6d8f970c4e2882cc75b8c5323 /app | |
parent | 10cf1294cb5f4070ae9f0ade0b7610cb799baeae (diff) | |
parent | 6931dd7f18b09319d9f4acde77ff42d1af355031 (diff) | |
download | gitlab-ce-87e163137cdfcaf7b0aab110dc776e7629402214.tar.gz |
Merge branch '4326-fix-js-or-true' into 'master'
Fix a JS bug in the websocket terminal
See merge request gitlab-org/gitlab-ce!17470
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/terminal/terminal.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/assets/javascripts/terminal/terminal.js b/app/assets/javascripts/terminal/terminal.js index 6b9422b1816..904b0093f7b 100644 --- a/app/assets/javascripts/terminal/terminal.js +++ b/app/assets/javascripts/terminal/terminal.js @@ -6,8 +6,14 @@ constructor(options) { this.options = options || {}; - this.options.cursorBlink = options.cursorBlink || true; - this.options.screenKeys = options.screenKeys || true; + if (!Object.prototype.hasOwnProperty.call(this.options, 'cursorBlink')) { + this.options.cursorBlink = true; + } + + if (!Object.prototype.hasOwnProperty.call(this.options, 'screenKeys')) { + this.options.screenKeys = true; + } + this.container = document.querySelector(options.selector); this.setSocketUrl(); |