Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-03-01 20:53:47 +0300
committerNick Thomas <nick@gitlab.com>2018-03-07 03:04:20 +0300
commit6931dd7f18b09319d9f4acde77ff42d1af355031 (patch)
tree7b16d8b47960e9d383789e17deb39b7d2938eece /app/assets/javascripts/terminal
parentff00cfe45c744393de5bfcafdcfbd12108cc664f (diff)
Fix a JS bug in the websocket terminal
Diffstat (limited to 'app/assets/javascripts/terminal')
-rw-r--r--app/assets/javascripts/terminal/terminal.js10
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();