From 5b812986fbf6bcd14c83a223fd004187dc1ce7b6 Mon Sep 17 00:00:00 2001 From: mfranz <mfranz> Date: Mon, 19 Mar 2007 18:17:05 +0000 Subject: [PATCH] undefined <condition>s are "true" --- Nasal/props.nas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Nasal/props.nas b/Nasal/props.nas index 729f35254..a951c8418 100644 --- a/Nasal/props.nas +++ b/Nasal/props.nas @@ -186,9 +186,11 @@ var setAll = func { ## # Evaluates a <condition> property branch according to the rules -# set out in $FG_ROOT/Docs/README.condition. +# set out in $FG_ROOT/Docs/README.condition. Undefined conditions +# are true. # var condition = func(p) { + if(p == nil) { return 1; } if(!isa(p, props.Node)) { p = props.globals.getNode(p); } return _cond_and(p) } @@ -251,3 +253,4 @@ var _cond_cmp = func(p, op) { return op == "LT" ? left < right : op == "GT" ? left > right : left == right; } +