mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
Convert trinary to more explicit statement.
This commit is contained in:
parent
61d4ea0009
commit
6789cce7a5
1 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue