From 635fa54303975f247eb2fdbd3eb92f9f148d87be Mon Sep 17 00:00:00 2001 From: Chintan Mehta Date: Wed, 22 Nov 2023 11:24:43 +0000 Subject: [PATCH] sharing parameter by value --- apps/platform/src/utils/global.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/platform/src/utils/global.js b/apps/platform/src/utils/global.js index ff0e52d77..b1550d45a 100644 --- a/apps/platform/src/utils/global.js +++ b/apps/platform/src/utils/global.js @@ -2,7 +2,7 @@ import { format } from "d3-format"; import config from "../config"; import { searchExamples, pppSearchExamples } from "../pages/HomePage/searchExamples"; -function pickTwo(arr) { +function pickTwo([...arr]) { const i1 = Math.floor(Math.random() * arr.length); const resultArray = arr.splice(i1, 1); const i2 = Math.floor(Math.random() * arr.length);