Skip to content

Commit

Permalink
Merge pull request #657 from reduxjs/bugfix/5.0-weakref-check
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson authored Dec 4, 2023
2 parents 87ac8fb + 484626e commit 2a1e055
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/build-and-test-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ jobs:
- name: Clone RTK repo
run: git clone https://github.com/reduxjs/redux-toolkit.git ./redux-toolkit

- name: Check out v2.0-integration
working-directory: ./redux-toolkit
run: git checkout v2.0-integration

- name: Check folder contents
run: ls -l .

Expand Down
5 changes: 4 additions & 1 deletion src/weakMapMemoize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ class StrongRef<T> {
}
}

const Ref = WeakRef ?? StrongRef
const Ref =
typeof WeakRef !== 'undefined'
? WeakRef
: (StrongRef as unknown as typeof WeakRef)

const UNTERMINATED = 0
const TERMINATED = 1
Expand Down

0 comments on commit 2a1e055

Please sign in to comment.