From cb2f77e25c1999fdce952e127d9bed6d87786bb8 Mon Sep 17 00:00:00 2001 From: Marek Kubica Date: Wed, 26 Jul 2023 12:20:51 +0200 Subject: [PATCH] Fix read-only constraint via mistyped key name Closes #689 --- lib/parser.js | 2 +- src/parser.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/parser.js b/lib/parser.js index 07ebef98..7fa2fc58 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -35,7 +35,7 @@ var descriptor; descriptor = Object.create(null); descriptor.value = value; - descriptor.writeable = true; + descriptor.writable = true; descriptor.enumerable = true; descriptor.configurable = true; return Object.defineProperty(obj, key, descriptor); diff --git a/src/parser.coffee b/src/parser.coffee index a478a857..dade8f39 100644 --- a/src/parser.coffee +++ b/src/parser.coffee @@ -19,7 +19,7 @@ defineProperty = (obj, key, value) -> # make sure the descriptor hasn't been prototype polluted descriptor = Object.create null descriptor.value = value - descriptor.writeable = true + descriptor.writable = true descriptor.enumerable = true descriptor.configurable = true Object.defineProperty obj, key, descriptor