From 094ad76f74eedaef79c7d68ce9892881fd3777ec Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Wed, 2 Nov 2011 16:26:17 -0400 Subject: [PATCH] fixing bug with structure type property stuff. --- js-assembler/runtime-src/baselib-structs.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js-assembler/runtime-src/baselib-structs.js b/js-assembler/runtime-src/baselib-structs.js index edfd807..cfa0455 100644 --- a/js-assembler/runtime-src/baselib-structs.js +++ b/js-assembler/runtime-src/baselib-structs.js @@ -228,6 +228,9 @@ // given structure property. var supportsStructureTypeProperty = function(structType, property) { var propertiesList = structType.propertiesList; + if (! propertiesList) { + return false; + } while (propertiesList !== baselib.lists.EMPTY) { if (propertiesList.first.first === property) { return true; @@ -242,6 +245,9 @@ // Returns the binding associated to this particular structure type propery. var lookupStructureTypeProperty = function(structType, property) { var propertiesList = structType.propertiesList; + if (! propertiesList) { + return undefined; + } while (propertiesList !== baselib.lists.EMPTY) { if (propertiesList.first.first === property) { return propertiesList.first.rest;