@@ -3,7 +3,7 @@ import { Drop } from '../drop/drop'
3
3
import { __assign } from 'tslib'
4
4
import { NormalizedFullOptions , defaultOptions , RenderOptions } from '../liquid-options'
5
5
import { 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'
7
7
8
8
type PropertyKey = string | number ;
9
9
@@ -133,7 +133,7 @@ export function readProperty (obj: Scope, key: PropertyKey, ownPropertyOnly: boo
133
133
return value
134
134
}
135
135
export 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
137
137
return obj [ key ]
138
138
}
139
139
@@ -148,7 +148,7 @@ function readLast (obj: Scope) {
148
148
}
149
149
150
150
function 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' ]
152
152
if ( isArray ( obj ) || isString ( obj ) ) return obj . length
153
153
if ( typeof obj === 'object' ) return Object . keys ( obj ) . length
154
154
}
0 commit comments