From cb91ee9a21d5f0722bfb1a6db5585c365fa1a774 Mon Sep 17 00:00:00 2001 From: Akash Kava <39438041+ackava@users.noreply.github.com> Date: Mon, 2 Sep 2024 11:32:30 +0530 Subject: [PATCH] Storage simlified --- YantraJS.Core.Tests/Imported/ArrayTests.cs | 2 +- YantraJS.Core/Core/Storage/UIntMapArray.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/YantraJS.Core.Tests/Imported/ArrayTests.cs b/YantraJS.Core.Tests/Imported/ArrayTests.cs index 056c2f2c..82e387fc 100644 --- a/YantraJS.Core.Tests/Imported/ArrayTests.cs +++ b/YantraJS.Core.Tests/Imported/ArrayTests.cs @@ -81,6 +81,7 @@ public void ArrayIndexer() // The array indexer can see the prototype elements. Evaluate("var array = [1, ,3]"); + var a = Evaluate("array"); Evaluate("Array.prototype[1] = 'two'"); Evaluate("Array.prototype[20] = 'twenty'"); try @@ -90,7 +91,6 @@ public void ArrayIndexer() Assert.AreEqual(true, Evaluate("array.hasOwnProperty(2)")); Assert.AreEqual(false, Evaluate("array.hasOwnProperty(20)")); Assert.AreEqual(1, Evaluate("array[0]")); - var a = Evaluate("array"); Assert.AreEqual("two", Evaluate("array[1]")); Assert.AreEqual(3, Evaluate("array[2]")); Assert.AreEqual("twenty", Evaluate("array[20]")); diff --git a/YantraJS.Core/Core/Storage/UIntMapArray.cs b/YantraJS.Core/Core/Storage/UIntMapArray.cs index bffa0de2..a8c4bc2e 100644 --- a/YantraJS.Core/Core/Storage/UIntMapArray.cs +++ b/YantraJS.Core/Core/Storage/UIntMapArray.cs @@ -255,7 +255,7 @@ public JSProperty this[uint index] //} } - public bool IsNull => !Storage.IsNull; + public bool IsNull => Storage.IsNull; [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool TryGetValue(uint key, out JSProperty value)