mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
feat: support function calls, closes #222
This commit is contained in:
@@ -70,8 +70,8 @@ export class Context {
|
||||
export function readProperty (obj: Scope, key: string) {
|
||||
if (isNil(obj)) return obj
|
||||
obj = toLiquid(obj)
|
||||
if (isFunction(obj[key])) return obj[key]()
|
||||
if (obj instanceof Drop) {
|
||||
if (isFunction(obj[key])) return obj[key]()
|
||||
if (obj.hasOwnProperty(key)) return obj[key]
|
||||
return obj.liquidMethodMissing(key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user