From a4ea8d63190cc424e5f47724dc85a24d672e703d Mon Sep 17 00:00:00 2001 From: tagspace Date: Thu, 23 Jan 2025 16:01:11 +0100 Subject: [PATCH] handle case where there is no security context provided (#207) Co-authored-by: Tom Gardiner --- src/cube.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cube.js b/src/cube.js index 215ce331..87eef6d2 100644 --- a/src/cube.js +++ b/src/cube.js @@ -1,5 +1,5 @@ function hashCode(obj) { - var str = JSON.stringify(obj); + var str = JSON.stringify(obj || {}); var hash = 0, i = 0, len = str.length; while ( i < len ) { hash = ((hash << 5) - hash + str.charCodeAt(i++)) << 0;