Skip to content

Commit e918d97

Browse files
committed
Fix bad equality imports
1 parent fb2bde7 commit e918d97

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/hooks/useSyncExternalStoreWithSelector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import is from '../utils/shallowEqual'
2+
import { is } from '../utils/shallowEqual'
33
import { useSyncExternalStore } from 'react'
44

55
// Intentionally not using named imports because Rollup uses dynamic dispatch

src/utils/shallowEqual.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function is(x: unknown, y: unknown) {
1+
export function is(x: unknown, y: unknown) {
22
if (x === y) {
33
return x !== 0 || y !== 0 || 1 / x === 1 / y
44
} else {

test/hooks/useSelector.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ describe('React', () => {
443443
expect(renderedItems.length).toEqual(2)
444444
})
445445

446-
it.only('only calls selectors if the state they depend on has changed', () => {
446+
it('only calls selectors if the state they depend on has changed', () => {
447447
const sliceA = createSlice({
448448
name: 'a',
449449
initialState: 0,

0 commit comments

Comments
 (0)