Skip to content

Commit fbf8c24

Browse files
author
ben.durrant
committed
don't throw error in production
1 parent 0a23a5c commit fbf8c24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/toolkit/src/createSlice.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ export function createSlice<
520520
// check if injectInto has been called
521521
if (this !== slice) {
522522
sliceState = this.getInitialState()
523-
} else {
523+
} else if (process.env.NODE_ENV !== 'production') {
524524
throw new Error(
525525
'selectState returned undefined for an uninjected slice reducer'
526526
)

0 commit comments

Comments
 (0)