Convert trinary to more explicit statement.

This commit is contained in:
wolfbeast 2018-07-26 23:14:11 +02:00 committed by Roy Tam
commit 6789cce7a5

View file

@ -368,9 +368,12 @@ Capture.prototype = {
tel("CAPTURE_QUEUE_TIME_MS", this.startDate - this.creationDate);
// timeout timer
let timeout = this.options && typeof(this.options.timeout) == "number" ?
this.options.timeout :
DEFAULT_CAPTURE_TIMEOUT;
let timeout;
if (this.options && typeof(this.options.timeout) == "number") {
timeout = this.options.timeout;
} else {
timeout = DEFAULT_CAPTURE_TIMEOUT;
}
this._timeoutTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
this._timeoutTimer.initWithCallback(this, timeout,
Ci.nsITimer.TYPE_ONE_SHOT);