diff --git a/src/component/common/SceneHelper.js b/src/component/common/SceneHelper.js index 7bf41600..4a33804a 100644 --- a/src/component/common/SceneHelper.js +++ b/src/component/common/SceneHelper.js @@ -80,7 +80,10 @@ SceneHelper.prototype = { self._skybox.setEnvironmentMap(lights.specular.cubemap); } - api.getZr().refresh(); + var zr = api.getZr(); + if (zr) { + zr.refresh(); + } }); } this._lightRoot.add(lights.diffuse); @@ -180,4 +183,4 @@ SceneHelper.prototype = { } }; -export default SceneHelper; \ No newline at end of file +export default SceneHelper;