From e07321024a6e6154718027ab867768bbd02affda Mon Sep 17 00:00:00 2001 From: HeskeyBaozi Date: Thu, 19 Jul 2018 21:15:51 +0800 Subject: [PATCH] fix demo for ssr --- components/icon/demo/svg-sprite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/icon/demo/svg-sprite.md b/components/icon/demo/svg-sprite.md index cc81fb93c9..d5c7bc2b4f 100644 --- a/components/icon/demo/svg-sprite.md +++ b/components/icon/demo/svg-sprite.md @@ -37,7 +37,7 @@ const messageSymbol = ` `; // insert SVG symbols into document.body -if (document) { +if (typeof document === 'object') { const nodeId = '__SVG_SPRITE_NODE__'; const spriteContent = svgSpriteRenderer(nodeId, messageSymbol); const existing = document.getElementById(nodeId);