Skip to content

Commit a7eddf2

Browse files
committed
fix: parse object proto pollution
1 parent 8f2510d commit a7eddf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ParseObject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ type ToJSON<T> = {
102102

103103
// Mapping of class names to constructors, so we can populate objects from the
104104
// server with appropriate subclasses of ParseObject
105-
const classMap: AttributeMap = {};
105+
const classMap: AttributeMap = Object.create(null);
106106

107107
// Global counter for generating unique Ids for non-single-instance objects
108108
let objectCount = 0;

0 commit comments

Comments
 (0)