Expose frptools utils: call and id
Makes subscribeToRender more tolerant of non-functions
This commit is contained in:
parent
e555dddcc0
commit
6295d9b177
@ -1,3 +1,4 @@
|
||||
export { prop } from './property';
|
||||
export { computed } from './computed';
|
||||
export { container } from './container';
|
||||
export { call, id } from './util.js';
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
"domvm": "~3.2.1",
|
||||
"exif-parser": "~0.1.9",
|
||||
"extract-text-webpack-plugin": "^3.0.2",
|
||||
"frptools": "2.2.0",
|
||||
"frptools": "3.0.1",
|
||||
"moment": "~2.19.3",
|
||||
"pica": "~2.0.8",
|
||||
"pouchdb-adapter-http": "~6.3.4",
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
// export * from 'domvm/dist/dev/domvm.dev.js';
|
||||
export * from 'domvm/dist/mini/domvm.mini.js';
|
||||
import { call } from 'frptools';
|
||||
import { deepAssign } from './conversion.js';
|
||||
import { error } from '../services/console.js';
|
||||
|
||||
@ -7,7 +8,7 @@ export function subscribeToRender(vm, subscribables, subscriptions) {
|
||||
const redraw = (...args) => vm.redraw();
|
||||
const subList = subscribables.map(s => s.subscribe(redraw)).concat(subscriptions);
|
||||
|
||||
vm.config({ hooks: { willUnmount: () => subList.forEach(s => s()) } });
|
||||
vm.config({ hooks: { willUnmount: () => subList.forEach(call) } });
|
||||
}
|
||||
|
||||
export function patchRefStyle(ref, style, evt, node, vm) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user