Browse Source

EAGLESIX-727 Expressions... DateToString. evaluateInternal() change to return a null for null input

Jason Walton 11 years ago
parent
commit
5eae6c65f9
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lib/pipeline/expressions/DateToStringExpression.js

+ 3 - 2
lib/pipeline/expressions/DateToStringExpression.js

@@ -192,8 +192,9 @@ proto.getOpName = function getOpName() {
 proto.evaluateInternal = function evaluateInternal(vars) {
     var date = this.operands[0].evaluateInternal(vars);
 
-    if (!date || date == null)
-    	return formatDate(this._format, date);
+    if (date === undefined || date === null)
+    	return null;
+	return formatDate(this._format, date);
 };
 
 proto.addDependencies = function addDependencies(depsTracker) {