Skip to content

Commit

Permalink
Clarify lowest compatible TypeScript version
Browse files Browse the repository at this point in the history
  • Loading branch information
diskdance committed Jun 7, 2022
1 parent dfdc2fe commit 67ff47a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
## Prerequisites
* `Node.js`
* `npm` or `yarn`
* `typescript` >= 4.3.5
* Visual Studio Code (Recommended)

## Quick start
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
* @return return `true` if it is; return `false` otherwise
*/
function isPlainObject( val: unknown ): val is Record<string, unknown> {
if ( val === null || typeof val !== 'object' || 'nodeType' in val || val === window ) {
if ( typeof val !== 'object' || val === null || 'nodeType' in val || val === window ) {

This comment has been minimized.

Copy link
@diskdance

diskdance Jun 7, 2022

Author Collaborator

Change order to make it work under ts >= 4.3.5.
See microsoft/TypeScript#28131.

return false;
}

Expand Down

0 comments on commit 67ff47a

Please sign in to comment.