From 0524f54a470c7ce56822c2c9026254ffeb69b47e Mon Sep 17 00:00:00 2001 From: stefanp Date: Thu, 18 Apr 2002 09:37:55 +0000 Subject: [PATCH] failure to catch an empty enumeration from javascript caused a bug when an application had no app.properties. workaround: check against new method SystemProperties.size(). --- Global/macros.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Global/macros.js b/Global/macros.js index 5f0b72c5..ace6eaae 100644 --- a/Global/macros.js +++ b/Global/macros.js @@ -25,10 +25,10 @@ function formatProperties(props,par) { var prefix = (par && par.prefix) ? par.prefix : ""; var suffix = (par && par.suffix) ? par.suffix : ""; var separator = (par && par.separator) ? par.separator : ""; + if ( props.size()==0 ) + return ""; var e = props.keys(); var arr = new Array(); - if ( e==null ) - return ""; while ( e.hasMoreElements() ) { arr[arr.length] = e.nextElement(); }