mirror of
https://github.com/YMFE/yapi.git
synced 2025-04-12 15:10:23 +08:00
fix: 不兼容 7.6 bug
This commit is contained in:
parent
7d841af6cd
commit
99df555daf
@ -40,8 +40,13 @@ const getStorage = async (id)=>{
|
||||
}
|
||||
}catch(e){
|
||||
console.error(e)
|
||||
return (...args)=>{
|
||||
console.error(...args)
|
||||
return {
|
||||
getItem: (name)=>{
|
||||
console.error(name, e)
|
||||
},
|
||||
setItem: (name, value)=>{
|
||||
console.error(name, value, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -247,7 +252,6 @@ async function crossRequest(defaultOptions, preScript, afterScript, commonContex
|
||||
query = {};
|
||||
query = Object.assign(query, urlObj.query);
|
||||
let context = {
|
||||
...commonContext,
|
||||
isNode,
|
||||
get href() {
|
||||
return urlObj.href;
|
||||
@ -279,6 +283,8 @@ async function crossRequest(defaultOptions, preScript, afterScript, commonContex
|
||||
storage: await getStorage(taskId)
|
||||
};
|
||||
|
||||
Object.assign(context, commonContext)
|
||||
|
||||
context.utils = Object.freeze({
|
||||
_: _,
|
||||
CryptoJS: CryptoJS,
|
||||
|
Loading…
x
Reference in New Issue
Block a user