|
1 | 1 | import store from "./store.js"; |
2 | 2 | import { batch, computed, effect, signal, untracked } from './core.js'; |
3 | 3 | import * as signals from './signal.js'; |
4 | | -import sprae, { use, decorate, directive, modifier, parse, throttle, debounce, _off, _state, _on, _dispose, _add, call } from './core.js'; |
| 4 | +import sprae, { use, decorate, directive, modifier, parse, throttle, debounce, _off, _state, _on, _dispose, _add } from './core.js'; |
5 | 5 | import pkg from './package.json' with { type: 'json' }; |
6 | 6 |
|
7 | 7 | import _if from "./directive/if.js"; |
@@ -53,7 +53,7 @@ const dir = (target, name, expr, state) => { |
53 | 53 | change = signal(0), // signal authorized to trigger effect: 0 = init; >0 = trigger |
54 | 54 | count = 0, // called effect count |
55 | 55 | evaluate = update.eval ?? parse(expr).bind(target), |
56 | | - _out, out = () => (_out && call(_out), _out=null) // effect trigger and invoke may happen in the same tick, so it will be effect-within-effect call - we need to store output of evaluate to return from trigger effect |
| 56 | + _out, out = () => (typeof _out === 'function' && _out(), _out=null) // effect trigger and invoke may happen in the same tick, so it will be effect-within-effect call - we need to store output of evaluate to return from trigger effect |
57 | 57 |
|
58 | 58 | state = target[_state] ?? state |
59 | 59 |
|
|
0 commit comments