File tree 2 files changed +5
-7
lines changed
2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,10 @@ export default function(initialize) {
4
4
let stale = false ;
5
5
let value ;
6
6
let resolve ;
7
- let dispose = initialize ( change ) ;
7
+ const dispose = initialize ( change ) ;
8
8
9
9
if ( dispose != null && typeof dispose !== "function" ) {
10
- console . warn ( "dispose is not a function; ignoring" , dispose ) ;
11
- dispose = null ;
10
+ throw new Error ( "invalid dispose" ) ;
12
11
}
13
12
14
13
function change ( x ) {
Original file line number Diff line number Diff line change 1
1
import that from "../that.js" ;
2
2
3
3
export default function ( initialize ) {
4
- const queue = [ ] ;
5
4
let resolve ;
6
- let dispose = initialize ( push ) ;
5
+ const queue = [ ] ;
6
+ const dispose = initialize ( push ) ;
7
7
8
8
if ( dispose != null && typeof dispose !== "function" ) {
9
- console . warn ( "dispose is not a function; ignoring" , dispose ) ;
10
- dispose = null ;
9
+ throw new Error ( "invalid dispose" ) ;
11
10
}
12
11
13
12
function push ( x ) {
You can’t perform that action at this time.
0 commit comments