From 6aa4138c00f36ffe348c3c75dec1191ac6c4c444 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 10 Oct 2017 20:01:23 +0800 Subject: [PATCH] Fix test warning --- components/input/calculateNodeHeight.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/input/calculateNodeHeight.tsx b/components/input/calculateNodeHeight.tsx index 00d509022e..299df2ccea 100644 --- a/components/input/calculateNodeHeight.tsx +++ b/components/input/calculateNodeHeight.tsx @@ -116,8 +116,8 @@ export default function calculateNodeHeight( hiddenTextarea.setAttribute('style', `${sizingStyle};${HIDDEN_TEXTAREA_STYLE}`); hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || ''; - let minHeight = -Infinity; - let maxHeight = Infinity; + let minHeight = Number.MIN_SAFE_INTEGER; + let maxHeight = Number.MAX_SAFE_INTEGER; let height = hiddenTextarea.scrollHeight; let overflowY;