#13095 closed defect (fixed)
dojo.cache improperly resolves already-resolved paths
Reported by: | Rawld Gill | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | General | Version: | 1.6.1 |
Keywords: | Cc: | bill | |
Blocked By: | Blocking: |
Description
The following usage of dojo.cache fails:
dojo.cache(require.toUrl("myModule/templates/template.html"));
Change History (2)
comment:1 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
Version 1.6- had the following signatures
1. (module(string), url(string) [, value]) 2. (module(object) [, value])
version 1.7+ adds the following signature
3. (path(string) [, value])
3 allows, e.g.,
dojo.cache(require.toUrl("myModule/templates/myTemplate.html"));
both with and without a value argument (the second argument is always a value and never a url).
Notice that (string, string) satisfies both 1 and 3. To resolve the ambiguity, notice further that in 1, the module string will never contain slashes whereas in 3 path will always contain slashes. Use this fact to decode real signature.
Note: See
TracTickets for help on using
tickets.
(In [25223]) fixed argument cracking for dojo.cache; fixes #13095