From 8f9b2e580ee9db04bf72bc58c40b8858d78383eb Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Thu, 9 Mar 2023 19:55:20 +0800 Subject: [PATCH] fix: quotes in key crashes --- src/util.ts | 6 ++++-- tests/index.test.tsx | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/util.ts b/src/util.ts index c11039b7..5084d5fc 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,3 +1,5 @@ +import React from 'react'; + /** * We trade Map as deps which may change with same value but different ref object. * We should make it as hash for deps @@ -18,6 +20,6 @@ export function stringify(obj: Record { it('key contains double quote should not crash', () => { render() + }); + + it('key could be number', () => { + render() }) });