[IMP] *: re-add a bunch of tests

This commit is contained in:
Samuel Degueldre
2021-10-21 10:13:08 +02:00
committed by Aaron Bohy
parent b6eb4d009e
commit ced5d0f69f
19 changed files with 1525 additions and 279 deletions
+2 -2
View File
@@ -16,12 +16,12 @@ export function onWillUpdateProps(fn: (nextProps: any) => Promise<void> | void |
export function onMounted(fn: () => void | any) {
const node = getCurrent()!;
node.mounted.push(fn);
node.mounted.unshift(fn);
}
export function onWillPatch(fn: () => Promise<void> | any | void) {
const node = getCurrent()!;
node.willPatch.push(fn);
node.willPatch.unshift(fn);
}
export function onPatched(fn: () => void | any) {
+1 -1
View File
@@ -19,7 +19,7 @@ export function useRef<C extends Component = Component>(name: string): Ref<C> {
return {
get el(): HTMLElement | null {
const val = node.refs[name];
return val!;
return val || null;
// if (val instanceof HTMLElement) {
// return val;
// } else if (val instanceof Component) {