This commit is contained in:
@jyuhsin
2025-10-29 11:48:35 +08:00
parent 90e563e41e
commit 3a8e58b558
2 changed files with 2 additions and 2 deletions
@@ -95,7 +95,7 @@ l
<script> <script>
// 安全地冻结 Object.prototype(跳过不可配置属性) // 安全地冻结 Object.prototype(跳过不可配置属性)
(function () { (function () {
const badKeys = ['__proto__', 'constructor', 'prototype']; const badKeys = ['constructor', 'prototype'];
for (const key of badKeys) { for (const key of badKeys) {
if (key in Object.prototype) { if (key in Object.prototype) {
try { try {
@@ -102,7 +102,7 @@
<script> <script>
// 安全地冻结 Object.prototype(跳过不可配置属性) // 安全地冻结 Object.prototype(跳过不可配置属性)
(function () { (function () {
const badKeys = ['__proto__', 'constructor', 'prototype']; const badKeys = ['constructor', 'prototype'];
for (const key of badKeys) { for (const key of badKeys) {
if (key in Object.prototype) { if (key in Object.prototype) {
try { try {