fix demo for ssr

This commit is contained in:
HeskeyBaozi 2018-07-19 21:15:51 +08:00
parent 50f5ee9059
commit e07321024a

View File

@ -37,7 +37,7 @@ const messageSymbol = `
</symbol>`;
// 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);