Skip to content

Commit

Permalink
fix: unimplemented conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenybai committed Feb 15, 2022
1 parent a89b5a1 commit 089dd1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ssr/memo.ts
@@ -1,13 +1,13 @@
import { VNode } from '../million/types';
import { fromStringToVNode } from '../shared/convert';
import { fromStringToDomNode, fromDomNodeToVNode } from '../shared/convert';

const cache = new Map<string, VNode>();
const cache = new Map<string, VNode | undefined>();

export const memo = (key: string): VNode | undefined => {
if (cache.has(key)) {
return cache.get(key);
} else {
const vnode = fromStringToVNode(key);
const vnode = fromDomNodeToVNode(fromStringToDomNode(key));
cache.set(key, vnode);
return vnode;
}
Expand Down

0 comments on commit 089dd1e

Please sign in to comment.