[gjs/ewlsh/implicit-mainloop] Fix eslint.
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/ewlsh/implicit-mainloop] Fix eslint.
- Date: Sat, 30 Jan 2021 20:51:05 +0000 (UTC)
commit 604f74081a6ddb423abd388112a9b97fd2355c4f
Author: Evan Welsh <contact evanwelsh com>
Date: Sat Jan 30 12:50:57 2021 -0800
Fix eslint.
modules/core/_timers.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/modules/core/_timers.js b/modules/core/_timers.js
index 5434b827..5c70c438 100644
--- a/modules/core/_timers.js
+++ b/modules/core/_timers.js
@@ -33,13 +33,15 @@ function checkBigInt(n) {
}
function ToNumber(interval) {
+ /* eslint-disable no-implicit-coercion */
if (typeof interval === 'number')
return interval;
else if (typeof interval === 'object')
- return Number(interval.valueOf()) || Number(interval);
+ return +interval.valueOf() || +interval;
- return Number(interval);
+ return +interval;
+ /* eslint-enable */
}
function setTimeout(callback, delay = 0, ...args) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]