Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#15678 closed defect (fixed)

dojo/date/locale improperly hard-codes the package name "dojo"

Reported by: Rawld Gill Owned by: Rawld Gill
Priority: low Milestone: 1.8
Component: Date Version: 1.7.3
Keywords: Cc: bill, Adam Peller
Blocked By: Blocking:

Description

In particular, the line

exports.addCustomFormats("dojo.cldr","gregorian");

assumes this module is always in the dojo namespace. With mapping is may not be, and hard-coding the name makes it impossible to map this module.

Change History (4)

comment:1 Changed 7 years ago by Rawld Gill

Owner: set to Rawld Gill
Resolution: fixed
Status: newclosed

In [29244]:

improved dojo/date/locale to no hard-code the package name dojo; fixes #15678; refs #15584

comment:2 Changed 7 years ago by Rawld Gill

Cc: bill Adam Peller added
Component: GeneralDate
Milestone: tbd1.8
Priority: undecidedlow

The change to setObject at the top of the file:

lang.setObject(module.id.replace(/\//g, "."), exports);

is probably not necessary because mapped modules should not be using global variables.

comment:3 Changed 7 years ago by bill

Yah, hopefully not necessary, because we have dozens of similar setObject() calls in dojo, and hundreds of indirect setObject() calls like:

dojo.declare("dijit.form.TextBox", ...
Last edited 7 years ago by bill (previous) (diff)

comment:4 Changed 6 years ago by bill

See #16401, listing this change as breaking support for other AMD loaders, at least theoretically.

Note: See TracTickets for help on using tickets.