Skip to content

Commit 62993db

Browse files
authored
Merge pull request #574 from lunarraid/bugfix/563-add-writable-to-read-only-check
Add 'writable' descriptor check to isReadOnlyProperty
2 parents 0f8db95 + c84b9a3 commit 62993db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/isReadOnlyProperty.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ export function isReadOnlyProperty(
66
const prototype = Object.getPrototypeOf(objectInstance);
77
const propertyDescriptor = Object.getOwnPropertyDescriptor(prototype, propertyKey);
88

9-
return !(typeof propertyDescriptor === 'undefined' || propertyDescriptor.set);
9+
return !(typeof propertyDescriptor === 'undefined' || propertyDescriptor.writable || propertyDescriptor.set);
1010
}

0 commit comments

Comments
 (0)