js: bugfix, pure call context lost
This commit is contained in:
parent
ff92ac5b16
commit
4dff854aa7
File diff suppressed because one or more lines are too long
@ -1431,6 +1431,7 @@ var doric = (function (exports) {
|
|||||||
for (let i = 2; i < arguments.length; i++) {
|
for (let i = 2; i < arguments.length; i++) {
|
||||||
argumentsList.push(arguments[i]);
|
argumentsList.push(arguments[i]);
|
||||||
}
|
}
|
||||||
|
hookBeforeNativeCall(context);
|
||||||
return Reflect.apply(Reflect.get(context.entity, methodName), context.entity, argumentsList);
|
return Reflect.apply(Reflect.get(context.entity, methodName), context.entity, argumentsList);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1442,6 +1442,7 @@ function pureCallEntityMethod(contextId, methodName, args) {
|
|||||||
for (let i = 2; i < arguments.length; i++) {
|
for (let i = 2; i < arguments.length; i++) {
|
||||||
argumentsList.push(arguments[i]);
|
argumentsList.push(arguments[i]);
|
||||||
}
|
}
|
||||||
|
hookBeforeNativeCall(context);
|
||||||
return Reflect.apply(Reflect.get(context.entity, methodName), context.entity, argumentsList);
|
return Reflect.apply(Reflect.get(context.entity, methodName), context.entity, argumentsList);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -229,6 +229,7 @@ export function pureCallEntityMethod(contextId, methodName, args) {
|
|||||||
for (let i = 2; i < arguments.length; i++) {
|
for (let i = 2; i < arguments.length; i++) {
|
||||||
argumentsList.push(arguments[i]);
|
argumentsList.push(arguments[i]);
|
||||||
}
|
}
|
||||||
|
hookBeforeNativeCall(context);
|
||||||
return Reflect.apply(Reflect.get(context.entity, methodName), context.entity, argumentsList);
|
return Reflect.apply(Reflect.get(context.entity, methodName), context.entity, argumentsList);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -289,6 +289,7 @@ export function pureCallEntityMethod(contextId: string, methodName: string, args
|
|||||||
for (let i = 2; i < arguments.length; i++) {
|
for (let i = 2; i < arguments.length; i++) {
|
||||||
argumentsList.push(arguments[i])
|
argumentsList.push(arguments[i])
|
||||||
}
|
}
|
||||||
|
hookBeforeNativeCall(context)
|
||||||
return Reflect.apply(Reflect.get(context.entity, methodName), context.entity, argumentsList)
|
return Reflect.apply(Reflect.get(context.entity, methodName), context.entity, argumentsList)
|
||||||
} else {
|
} else {
|
||||||
loge(`Cannot find method for context id:${contextId},method name is:${methodName}`)
|
loge(`Cannot find method for context id:${contextId},method name is:${methodName}`)
|
||||||
|
Reference in New Issue
Block a user