Skip to content

Commit e9a379c

Browse files
committed
refactor: add console.error instead throw new error
1 parent 05b878d commit e9a379c

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
@@ -268,7 +268,7 @@ export function createSlice<
268268
process.env.NODE_ENV === 'development'
269269
) {
270270
if(options.initialState === undefined) {
271-
throw new Error('initial state must be different of undefined')
271+
console.error('initial state must be different of undefined')
272272
}
273273
}
274274

0 commit comments

Comments
 (0)