diff options
author | Nick Thomas <nick@gitlab.com> | 2018-03-01 17:53:47 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-03-07 00:04:20 +0000 |
commit | 6931dd7f18b09319d9f4acde77ff42d1af355031 (patch) | |
tree | 7b16d8b47960e9d383789e17deb39b7d2938eece /app/assets/javascripts/terminal | |
parent | ff00cfe45c744393de5bfcafdcfbd12108cc664f (diff) | |
download | gitlab-ce-6931dd7f18b09319d9f4acde77ff42d1af355031.tar.gz |
Fix a JS bug in the websocket terminal
Diffstat (limited to 'app/assets/javascripts/terminal')
-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(); |