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 {
throw Error('Unrecognized unit: ' + unit);
}
newNode = newNode || originalNode;
newIndex = goog.isDef(newIndex) ? newIndex : this.index_;
newIndex = (newIndex !== undefined) ? newIndex : this.index_;
return new cursors.Cursor(newNode, newIndex);
}
......
......@@ -406,7 +406,7 @@ BrailleInputHandler = class {
// so that these keys work even if the Braille IME is not active.
const keyName = /** @type {string} */ (event.standardKeyCode);
const numericCode = BrailleKeyEvent.keyCodeToLegacyCode(keyName);
if (!goog.isDef(numericCode)) {
if (!numericCode) {
throw Error('Unknown key code in event: ' + JSON.stringify(event));
}
EventGenerator.sendKeyPress(numericCode, {
......
......@@ -32,8 +32,7 @@ LibLouis = class {
* Path to translation tables.
* @private {?string}
*/
this.tablesDir_ = goog.isDef(opt_tablesDir) ? opt_tablesDir : null;
this.tablesDir_ = (opt_tablesDir !== undefined) ? opt_tablesDir : null;
/**
* Whether liblouis is loaded.
......
......@@ -39,14 +39,15 @@ NavBraille = class {
* Selection start index.
* @type {number}
*/
this.startIndex = goog.isDef(kwargs.startIndex) ? kwargs.startIndex : -1;
this.startIndex =
(kwargs.startIndex !== undefined) ? kwargs.startIndex : -1;
/**
* Selection end index.
* @type {number}
*/
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