Opened 8 years ago

Closed 7 years ago

#14286 closed enhancement (fixed)

make staticHasFeatures support non-booleans

Reported by: bill Owned by: Rawld Gill
Priority: high Milestone: 1.8
Component: BuildSystem Version: 1.7.0
Keywords: Cc:
Blocked By: Blocking: #14801

Description

Some of the has() tests in dojo return numbers, rather than truthy values (true/false or 0/1). For example, has("ie") returns 6, 7, 8, or 9. has("...") for other browsers also return numbers.

staticHasFeatures cannot be used to optimize code branches with these has() references because even with a profile like:

staticHasFeatures:{
	chrome: undefined,
	mozilla: undefined,
	ie: 7
}

It will strangely replace has("ie") with 1 instead of 7.

Change History (5)

comment:1 Changed 7 years ago by Rawld Gill

Milestone: 1.8
Status: newassigned

comment:2 Changed 7 years ago by bill

Blocking: 14801 added

comment:3 Changed 7 years ago by bill

Blocking: 14801 added

comment:4 Changed 7 years ago by Rawld Gill

See also #14792 which has a test case.

comment:5 Changed 7 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

In [28541]:

improved static has processing; removed some cruft discovered while doing the work; fixes #14286; !strict

Note: See TracTickets for help on using tickets.