From 01a420fd812210bb0554dc5e42f53fbd0d72ca71 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Wed, 30 Jan 2019 10:28:28 -0500 Subject: [PATCH] Revert "set_default: Allow empty vectors" I need to revert this for now because it breaks YAML test cases. The proper fix is a more expressive type system with dependent types that would allow it to know the proper number of indexes to initialize relative to other inputs. I wanted to implement this anyway to help catch iteration-related bugs. I'm tabling this for now, though, since I have other things that I need to work on. This reverts commit 4406cbe553d91fb2244901b7d4218b2831f01213. --- src/current/compiler/js.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/current/compiler/js.xsl b/src/current/compiler/js.xsl index 658356cb..4cd338c6 100644 --- a/src/current/compiler/js.xsl +++ b/src/current/compiler/js.xsl @@ -1932,7 +1932,7 @@ input = input || []; // vector or matrix - var i = input.length || 0; + var i = input.length || 1; var ret = []; var value = ( depth === 2 ) ? [ value ] : value;