Skip to content

Commit b13886b

Browse files
authored
types(reactivity): remove this in get accessor, fix #800 (#806)
1 parent 2577275 commit b13886b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/reactivity/src/baseHandlers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const arrayInstrumentations: Record<string, Function> = {}
2323
for (let i = 0, l = (this as any).length; i < l; i++) {
2424
track(arr, TrackOpTypes.GET, i + '')
2525
}
26-
// we run the method using the orignal args first (which may be reactive)
26+
// we run the method using the original args first (which may be reactive)
2727
const res = arr[key](...args)
2828
if (res === -1 || res === false) {
2929
// if that didn't work, run it again using raw values.

packages/reactivity/src/collectionHandlers.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ const readonlyInstrumentations: Record<string, Function> = {
200200
get(this: MapTypes, key: unknown) {
201201
return get(this, key, toReadonly)
202202
},
203-
get size(this: IterableCollections) {
204-
return size(this)
203+
get size() {
204+
return size((this as unknown) as IterableCollections)
205205
},
206206
has,
207207
add: createReadonlyMethod(add, TriggerOpTypes.ADD),

0 commit comments

Comments
 (0)