diff --git a/ts/protobuf/utils.ts b/ts/protobuf/utils.ts
index 25a7c5e30..12c0f2a5d 100644
--- a/ts/protobuf/utils.ts
+++ b/ts/protobuf/utils.ts
@@ -6,8 +6,11 @@
* @param property - The property you want make sure is not undefined
* @returns true if the property is defined or false if undefined or using a type-specific default value
*/
-function hasDefinedProperty(object: A, property: B) {
- return object.hasOwnProperty(property) !== false;
+function hasDefinedProperty(
+ object: A,
+ property: B
+) {
+ return Object.prototype.hasOwnProperty.call(object, property) !== false;
}
export const ProtobufUtils = {