tracker issue : CF-4204063

select a category, or use search below
(searches all categories and all time range)
Title:

IsNull() Always returns true when Evaluating a Safe Navigation expression

| View in Tracker

Status/Resolution/Reason: To Fix//BugVerified

Reporter/Name(from Bugbase): Robert Y. / ()

Created: 03/04/2019

Components: Language

Versions: 2016,13.0

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2016.0.10.314028 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 10 64 bit

Vote Count: 0

Problem Description:
Passing an expression that uses the Safe Navigation Operator to the isNull function will always return true even if the value is not null. Storing the value in a variable first and passing that variable to isNull does not cause this issue.
Steps to Reproduce:
var a = {
	b: {
		c: 'test'
	}
};

var Test = a?.b?.c;
var result1 = isNull( a?.b?.c );
var result2 = isNull( test);

Actual Result:
The variable Test will equal 'test'. The variable result1 equals 'YES'. The variable result2 equals 'NO'.

Expected Result:
It seems that result1 and result2 should both equal 'NO'.

Any Workarounds:
Store the value in a variable before passing it to isNull.

Attachments:

Comments: