Commit 1ed40e6a authored by Akihiro Ota's avatar Akihiro Ota Committed by Commit Bot

ChromeVox: Fix closure errors by removing calls to goog.isDef().

Bug: N/A
Change-Id: Ibc913eaefe212b621b7ffdd83e05bdd75f62920b
AX-Relnotes: N/A
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2480733Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: Akihiro Ota <akihiroota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818544}
parent 0fb89184
...@@ -458,7 +458,7 @@ cursors.Cursor = class { ...@@ -458,7 +458,7 @@ cursors.Cursor = class {
throw Error('Unrecognized unit: ' + unit); throw Error('Unrecognized unit: ' + unit);
} }
newNode = newNode || originalNode; newNode = newNode || originalNode;
newIndex = goog.isDef(newIndex) ? newIndex : this.index_; newIndex = (newIndex !== undefined) ? newIndex : this.index_;
return new cursors.Cursor(newNode, newIndex); return new cursors.Cursor(newNode, newIndex);
} }
......
...@@ -406,7 +406,7 @@ BrailleInputHandler = class { ...@@ -406,7 +406,7 @@ BrailleInputHandler = class {
// so that these keys work even if the Braille IME is not active. // so that these keys work even if the Braille IME is not active.
const keyName = /** @type {string} */ (event.standardKeyCode); const keyName = /** @type {string} */ (event.standardKeyCode);
const numericCode = BrailleKeyEvent.keyCodeToLegacyCode(keyName); const numericCode = BrailleKeyEvent.keyCodeToLegacyCode(keyName);
if (!goog.isDef(numericCode)) { if (!numericCode) {
throw Error('Unknown key code in event: ' + JSON.stringify(event)); throw Error('Unknown key code in event: ' + JSON.stringify(event));
} }
EventGenerator.sendKeyPress(numericCode, { EventGenerator.sendKeyPress(numericCode, {
......
...@@ -32,8 +32,7 @@ LibLouis = class { ...@@ -32,8 +32,7 @@ LibLouis = class {
* Path to translation tables. * Path to translation tables.
* @private {?string} * @private {?string}
*/ */
this.tablesDir_ = goog.isDef(opt_tablesDir) ? opt_tablesDir : null; this.tablesDir_ = (opt_tablesDir !== undefined) ? opt_tablesDir : null;
/** /**
* Whether liblouis is loaded. * Whether liblouis is loaded.
......
...@@ -39,14 +39,15 @@ NavBraille = class { ...@@ -39,14 +39,15 @@ NavBraille = class {
* Selection start index. * Selection start index.
* @type {number} * @type {number}
*/ */
this.startIndex = goog.isDef(kwargs.startIndex) ? kwargs.startIndex : -1; this.startIndex =
(kwargs.startIndex !== undefined) ? kwargs.startIndex : -1;
/** /**
* Selection end index. * Selection end index.
* @type {number} * @type {number}
*/ */
this.endIndex = this.endIndex =
goog.isDef(kwargs.endIndex) ? kwargs.endIndex : this.startIndex; (kwargs.endIndex !== undefined) ? kwargs.endIndex : this.startIndex;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment