mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-13 04:03:07 +00:00
fix: remove function bind
If the returned function is bound to a context, there is no way to call it with `call` and `apply`.
This commit is contained in:
parent
ce7e766b86
commit
fc947d2feb
@ -264,8 +264,7 @@ function parseExpression(a: any, b?: any, c = false) {
|
|||||||
if (!thisRequired) {
|
if (!thisRequired) {
|
||||||
code = `with($scope){${code}}`;
|
code = `with($scope){${code}}`;
|
||||||
}
|
}
|
||||||
const result = new Function('$scope', code)(self);
|
return new Function('$scope', code)(self);
|
||||||
return typeof result === "function" ? result.bind(self): result;
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logger.error(`${logScope || ''} parseExpression.error`, err, str, self?.__self ?? self);
|
logger.error(`${logScope || ''} parseExpression.error`, err, str, self?.__self ?? self);
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user