Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit f8071fa

Browse files
committed
fix: make mutation works in ssr env
1 parent f6355d8 commit f8071fa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/legacy/xconsole-mutation/src/_debug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default (message, data) => {
2-
const _logger = document.querySelector('#xconsole-logger');
2+
const _logger = typeof document !== 'undefined' && document.querySelector('#xconsole-logger');
33
if (_logger) {
44
_logger.innerHTML += `<div class="log-item"> ${JSON.stringify(message)} ${JSON.stringify(data)}</div>`
55
}

packages/xconsole/xconsole.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"2.3.38"}
1+
{"version":"2.3.39"}

0 commit comments

Comments
 (0)