docs: fix biuld for node 22
This commit is contained in:
parent
bf72d38fcf
commit
750f89b6ce
1 changed files with 7 additions and 4 deletions
|
|
@ -60,10 +60,6 @@ window = {
|
|||
location: {search: ''},
|
||||
Image: Function,
|
||||
document: document,
|
||||
navigator: {
|
||||
platform:'',
|
||||
userAgent: ''
|
||||
},
|
||||
NodeList: Array,
|
||||
WebSocket: Object,
|
||||
localStorage: {
|
||||
|
|
@ -81,7 +77,14 @@ window = {
|
|||
ENV: {id: ''},
|
||||
IP: '',
|
||||
DOM
|
||||
}
|
||||
|
||||
if (!global.navigator) {
|
||||
// defined as getter since node 22
|
||||
window.navigator = {
|
||||
platform:'',
|
||||
userAgent: ''
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(global, window)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue