From bd84804e32e4a817f3d92a22d863ce6a6d43bbf4 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Mon, 21 Mar 2022 13:07:44 +0100 Subject: [PATCH] Fixed: Usage of eval instead of JSON.parse for parsing JSON (#3016) Using eval for parsing JSON is considered bad practice and is also slower --- AppKit/CPColorPanel.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPColorPanel.j b/AppKit/CPColorPanel.j index e8a9320eb..ba1521b5f 100644 --- a/AppKit/CPColorPanel.j +++ b/AppKit/CPColorPanel.j @@ -483,7 +483,7 @@ var CPColorPanelSwatchesCookie = "CPColorPanelSwatchesCookie"; ]; } - var cookieValue = eval(cookieValue); + var cookieValue = JSON.parse(cookieValue); return [cookieValue arrayByApplyingBlock:function(value) {