@@ -3,7 +3,7 @@ import { Drop } from '../drop/drop'
33import { __assign } from 'tslib'
44import { NormalizedFullOptions , defaultOptions , RenderOptions } from '../liquid-options'
55import { Scope } from './scope'
6- import { isArray , isNil , isUndefined , isString , isFunction , toLiquid , InternalUndefinedVariableError , toValueSync , isObject , Limiter } from '../util'
6+ import { hasOwnProperty , isArray , isNil , isUndefined , isString , isFunction , toLiquid , InternalUndefinedVariableError , toValueSync , isObject , Limiter } from '../util'
77
88type PropertyKey = string | number ;
99
@@ -133,7 +133,7 @@ export function readProperty (obj: Scope, key: PropertyKey, ownPropertyOnly: boo
133133 return value
134134}
135135export function readJSProperty ( obj : Scope , key : PropertyKey , ownPropertyOnly : boolean ) {
136- if ( ownPropertyOnly && ! Object . hasOwnProperty . call ( obj , key ) && ! ( obj instanceof Drop ) ) return undefined
136+ if ( ownPropertyOnly && ! hasOwnProperty . call ( obj , key ) && ! ( obj instanceof Drop ) ) return undefined
137137 return obj [ key ]
138138}
139139
@@ -148,7 +148,7 @@ function readLast (obj: Scope) {
148148}
149149
150150function readSize ( obj : Scope ) {
151- if ( obj . hasOwnProperty ( 'size' ) || obj [ 'size' ] !== undefined ) return obj [ 'size' ]
151+ if ( hasOwnProperty . call ( obj , 'size' ) || obj [ 'size' ] !== undefined ) return obj [ 'size' ]
152152 if ( isArray ( obj ) || isString ( obj ) ) return obj . length
153153 if ( typeof obj === 'object' ) return Object . keys ( obj ) . length
154154}
0 commit comments