From 3555533f7f48582e9d1790489e406946e4f99da3 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 26 Jul 2018 23:14:11 +0200 Subject: Convert trinary to more explicit statement. --- toolkit/components/thumbnails/BackgroundPageThumbs.jsm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'toolkit/components/thumbnails') diff --git a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm index e743c4dd9..7b86fa07c 100644 --- a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm +++ b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm @@ -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); -- cgit v1.2.3