#8334 closed defect (fixed)
null values destroy jsonPathStore.cleanMeta
Reported by: | Ozzi Lee | Owned by: | Dustin Machi |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | DojoX Data | Version: | 1.2.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
jsonPathStore.cleanMeta recursively removes metadata from a data argument.
If called without a data argument, it uses the jsonPathStore's internal _data property, by doing:
this._data |
However, if the data object contains a non-true value anywhere in it, cleanMeta sees that as having been called without a data argument, and recurses over again with the _data property. This leads to infinite recursion.
The fix is to use:
if (arguments.length === 0) { data = this._data }
instead.
Change History (7)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Owner: | changed from Jared Jurkiewicz to kriszyp |
---|
comment:3 Changed 12 years ago by
Owner: | changed from kriszyp to Kris Zyp |
---|
comment:4 Changed 12 years ago by
Owner: | changed from Kris Zyp to Dustin Machi |
---|
comment:5 Changed 12 years ago by
Milestone: | tbd → future |
---|
comment:6 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [20831]) jsonPathStore is out of sync due to the more advanced dojox.json capabilities. To avoid confusion with these, I'm removing this widget as I dont' plan to support it going forward. There is an equivalent widget which uses dojox.json ref and query in dojoc/dmachi/data called JsonStore? for those who still need this capability. While they are not drop in replacements of each other, they are pretty close and it should not take a significant amount of time to convert, and the benefits gained in performance and querying flexibility are worth it. closes #7473 closes #8175 closes #7331 closes #7403 closes #8312 closes #8334 closes #9976 closes #10290
comment:7 Changed 11 years ago by
Milestone: | future → 1.4 |
---|
Sorry, wiki formatting messed me up. The first code example should be:
data = data || this._data