Opened 12 years ago

Last modified 7 years ago

#2536 closed defect

dojo.requireIf fails in custom build with parentheses condition — at Version 4

Reported by: robert.coup@… Owned by: James Burke
Priority: high Milestone: future
Component: BuildSystem Version: 0.4.2rc1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by James Burke)

In a source file, doing dojo.requireIf( (!(a && a.b)), "a.b") returns an error during the build "exception: SyntaxError?: missing ) after argument list". (rev 7517)

Refactoring the requireIf statement to look like: dojo.requireIf( !a || !a.b, "a.b") works fine. (ie. remove the parentheses)

I assume its a regexp somewhere which isn't being greedy enough, but I couldn't seem to find the correct one in buildUtil.js.

Change History (4)

comment:1 Changed 12 years ago by James Burke

Milestone: 1.0

comment:2 Changed 12 years ago by James Burke

Milestone: 1.01.1

See #4462: it might have a parens matching code change, and if so, it should solve this issue. Pushing to 1.1, with #4462.

comment:3 Changed 11 years ago by James Burke

Milestone: 1.11.2

comment:4 Changed 11 years ago by James Burke

Description: modified (diff)
Milestone: 1.2future
Note: See TracTickets for help on using tickets.