From a69bf22648b27b67943f2b103d3868d3c2293a3e Mon Sep 17 00:00:00 2001 From: Arturo Fonseca <49870466+arturo32@users.noreply.github.com> Date: Mon, 2 Dec 2024 00:26:25 -0300 Subject: [PATCH] fix: array type logic --- memoryCell.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/memoryCell.js b/memoryCell.js index f1adb43..eb4b4b0 100644 --- a/memoryCell.js +++ b/memoryCell.js @@ -79,7 +79,7 @@ export default { } }, content() { - if (this.isInHeap) { + if (this.isArray) { return this.variable[1][2][3]; } else { return this.variable[1][3]; @@ -91,6 +91,9 @@ export default { isInHeap() { return this.variable[2]; }, + isArray() { + this.variable[2][2].constructor === Array; + } }, watch: { variable:{