Skip to content

Commit d02a2dd

Browse files
authored
use Symbol insteads of magic string
1 parent bcc590f commit d02a2dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js-cookie-monitor-debugger-hook.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function init() {
112112
let realDocumentCookieProperty = null;
113113

114114
// 用于区分是本插件自己调用的definePropertyIsMe还是外部调用的
115-
const definePropertyIsMe = "CC11001100-js-cookie-monitor-debugger-hook";
115+
const definePropertyIsMe = Symbol("definePropertyIsMe");
116116

117117
// 页面内部的Object.defineProperty需要能够劫持一下
118118
(function () {

0 commit comments

Comments
 (0)