Opened 8 years ago
Closed 7 years ago
#16158 closed defect (fixed)
[patch] Invalid 'in' operand, using Cache with JsonRest PUT
Reported by: | nosuchluke | Owned by: | Kris Zyp |
---|---|---|---|
Priority: | high | Milestone: | 1.10 |
Component: | Data | Version: | 1.8.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
var store = new Cache(new JsonRest({ target: "/stuff" }), new Memory()); store.put({id:1}).then(null, function(err){alert(err);});
Result:
TypeError: invalid 'in' operand _7
This seems to result when the PUT returns a 204 or no-content 200, which is correct REST behavior. The result from JsonRest.put()
is null
, then in Cache
we get to:
cachingStore.put(typeof result == "object" ? result : object, directives);
Since null
is of type object
, null
gets passed to Memory
, which then vomits in disgust.
Someone else encountered the problem here.
Change History (7)
comment:1 Changed 8 years ago by
Component: | General → Data |
---|---|
Owner: | set to Kris Zyp |
comment:2 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 8 years ago by
Milestone: | tbd → 1.9 |
---|
comment:4 Changed 7 years ago by
Milestone: | 1.9 → 1.10 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Reopened because of https://github.com/dojo/dojo/pull/40
comment:5 Changed 7 years ago by
Summary: | Invalid 'in' operand, using Cache with JsonRest PUT → [patch] Invalid 'in' operand, using Cache with JsonRest PUT |
---|
Fix is trivial, so no CLA needed.
comment:6 Changed 7 years ago by
Priority: | undecided → high |
---|
comment:7 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Note: See
TracTickets for help on using
tickets.
In [29843]: