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
This commit is contained in:
Clement Ho 2018-03-07 17:45:42 +00:00
commit 87e163137c
1 changed files with 8 additions and 2 deletions

View File

@ -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();