Skip to content

Commit f86206f

Browse files
committed
Use invariant in sample
1 parent 374f13c commit f86206f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/effector/sample.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import {isStore, isEvent, isEffect} from 'effector/stdlib'
44
import {type Event, forward, eventFabric} from 'effector/event'
55
import {type Store, storeFabric} from 'effector/store'
66
import type {Effect} from 'effector/effect'
7-
import warning from 'warning'
7+
8+
import invariant from 'invariant'
89

910
function sampleStore(source: Store<any>, sampler: Event<any> | Store<any>) {
1011
let current = undefined
@@ -63,7 +64,7 @@ export function sample(
6364
//$off
6465
return sampleEvent(source, sampler)
6566
}
66-
warning(
67+
invariant(
6768
false,
6869
'sample: First argument should be Event, Store or Effect, but you passed %s.',
6970
source,

0 commit comments

Comments
 (0)