From c06d62a5315bd0d49b6aead0d9b38d703548243e Mon Sep 17 00:00:00 2001 From: MusikAnimal Date: Fri, 2 Feb 2024 14:10:31 +0300 Subject: [PATCH] watchstar: use mw.util.isInfinity() instead of comparing to 'infinity' Bug: T353389 Bug: T353483 Change-Id: I580deb0ba47e4c13643524ddd4d57f1a8e0a35ae --- package-lock.json | 14 +++++++------- package.json | 2 +- resources/skins.vector.js/watchstar.js | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 147318da1..264d75f5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@wikimedia/codex": "1.6.0", "@wikimedia/codex-icons": "1.6.0", "@wikimedia/mw-node-qunit": "7.2.0", - "@wikimedia/types-wikimedia": "0.4.2", + "@wikimedia/types-wikimedia": "0.4.3", "eslint-config-wikimedia": "0.27.0", "eslint-plugin-no-jquery": "2.7.0", "grunt-banana-checker": "0.13.0", @@ -2792,9 +2792,9 @@ "dev": true }, "node_modules/@wikimedia/types-wikimedia": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@wikimedia/types-wikimedia/-/types-wikimedia-0.4.2.tgz", - "integrity": "sha512-MWZJE6JRUYRSuwajjiO4l7xz6530MUqdTOP0t0AteVm8Gqs+hUEcs5tTmAVJDg/ByvzyZ/M/KsW1UcuTRs0N8g==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@wikimedia/types-wikimedia/-/types-wikimedia-0.4.3.tgz", + "integrity": "sha512-c9qY4NUNLsc5OHpFIPd2EMMtqqI5g5PYMSg/ivaDxbn4gJf+1xbFzEC1kQCraCoIWFu9kvXdsMx+ZfhRsSkUaA==", "dev": true }, "node_modules/abab": { @@ -15242,9 +15242,9 @@ } }, "@wikimedia/types-wikimedia": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@wikimedia/types-wikimedia/-/types-wikimedia-0.4.2.tgz", - "integrity": "sha512-MWZJE6JRUYRSuwajjiO4l7xz6530MUqdTOP0t0AteVm8Gqs+hUEcs5tTmAVJDg/ByvzyZ/M/KsW1UcuTRs0N8g==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@wikimedia/types-wikimedia/-/types-wikimedia-0.4.3.tgz", + "integrity": "sha512-c9qY4NUNLsc5OHpFIPd2EMMtqqI5g5PYMSg/ivaDxbn4gJf+1xbFzEC1kQCraCoIWFu9kvXdsMx+ZfhRsSkUaA==", "dev": true }, "abab": { diff --git a/package.json b/package.json index a4626e5d9..6a8f15813 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@wikimedia/codex": "1.6.0", "@wikimedia/codex-icons": "1.6.0", "@wikimedia/mw-node-qunit": "7.2.0", - "@wikimedia/types-wikimedia": "0.4.2", + "@wikimedia/types-wikimedia": "0.4.3", "eslint-config-wikimedia": "0.27.0", "eslint-plugin-no-jquery": "2.7.0", "grunt-banana-checker": "0.13.0", diff --git a/resources/skins.vector.js/watchstar.js b/resources/skins.vector.js/watchstar.js index 0028b4050..bd8badf33 100644 --- a/resources/skins.vector.js/watchstar.js +++ b/resources/skins.vector.js/watchstar.js @@ -15,7 +15,7 @@ const updateWatchIcon = ( watchIcon, isWatched, expiry ) => { ); if ( isWatched ) { - if ( expiry === 'infinity' ) { + if ( mw.util.isInfinity( expiry ) ) { watchIcon.classList.add( 'mw-ui-icon-wikimedia-unStar' ); } else { watchIcon.classList.add( 'mw-ui-icon-wikimedia-halfStar' );