summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2018-03-07 17:45:42 +0000
committerClement Ho <clemmakesapps@gmail.com>2018-03-07 17:45:42 +0000
commit87e163137cdfcaf7b0aab110dc776e7629402214 (patch)
tree58587115cd47a7e6d8f970c4e2882cc75b8c5323
parent10cf1294cb5f4070ae9f0ade0b7610cb799baeae (diff)
parent6931dd7f18b09319d9f4acde77ff42d1af355031 (diff)
downloadgitlab-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
-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();