@lobehub/ui 2.7.2 → 2.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,7 +52,7 @@ var SyntaxMermaid = /*#__PURE__*/memo(function (_ref) {
52
52
  var finalSvgString = data;
53
53
 
54
54
  // 修复Firefox点击预览mermaid图时宽高为0导致不显示的异常
55
- if (navigator.userAgent.includes('Firefox')) {
55
+ if (typeof window !== 'undefined' && typeof navigator !== 'undefined' && navigator.userAgent.includes('Firefox')) {
56
56
  var parser = new DOMParser();
57
57
  var svgDoc = parser.parseFromString(data, 'image/svg+xml');
58
58
  var svgElement = svgDoc.documentElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",