Skip to content

Commit

Permalink
PLATUI-1154: Add polyfill for Number.isNaN to fix timeout dialog issu…
Browse files Browse the repository at this point in the history
…e on IE

Tested that the timeout dialog displays on:

Mac OS 11.3 Chrome 90
Mac OS 11.3 Firefox 88
Mac OS 11.3 Safari 14.1
Windows 10 IE 11
Windows 10 Edge 90
Windows 10 Firefox 88
Windows 10 Chrome 90
Android v9 Samsung Galaxy S10 Chrome
Android v9 Samsung Galaxy S10 Samsung Internet
iPhone X, iOS 14.4.2, Safari
iPhone X, iOS 14.4.2, Chrome
  • Loading branch information
matthewmascord committed May 5, 2021
1 parent 382d0b6 commit 94e26e5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [1.33.0] - 2021-05-04

## Fixed

- Fix timeout dialog on IE by adding polyfill for Number.isNaN

## [1.32.0] - 2021-04-29

## Fixed
Expand Down
2 changes: 1 addition & 1 deletion check-compatibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if (!knownPrototypeKitNames.includes(consumerPackageJson.name)) {
}

const compatibility = {
1.30: {
1.33: {
'prototype-kit': ['9.12', '9.11', '9.10', '9.9', '9.8', '9.7', '9.6', '9.5', '9.4', '9.3', '9.2', '9.1', '9.0', '9.9', '9.10', '9.11'],
},
0.6: {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hmrc-frontend",
"version": "1.32.0",
"version": "1.33.0",
"description": "Design patterns for HMRC frontends",
"scripts": {
"start": "gulp dev",
Expand Down
2 changes: 2 additions & 0 deletions src/components/timeout-dialog/validate-input.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import '../../vendor/polyfills/Number/prototype/isNaN';

function ValidateInput() {
}

Expand Down
4 changes: 4 additions & 0 deletions src/vendor/polyfills/Number/prototype/isNaN.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN
Number.isNaN = Number.isNaN || function isNaN(input) {
return typeof input === 'number' && input !== input;
}

0 comments on commit 94e26e5

Please sign in to comment.