Opened 9 years ago

Closed 7 years ago

#11652 closed defect (wontfix)

null return value for JsonRestStore.getValue(..) cause error

Reported by: riceyeh Owned by: Kris Zyp
Priority: high Milestone: tbd
Component: DojoX Data Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description

Just find that it is impossible to get null value from a JsonRestStore?.getValue(..). Tracing the code, I find there are 2 places which does not check null value.

  1. line 415 in JsonRest?:

if(result.nodeType && result.cloneNode)

It should be changed to if(result && result.nodeType && result.cloneNode)

  1. line 223 in ServiceStore?:

delete item._loadObject;

It should be changed to item && delete item._loadObject;

Rice

Change History (3)

comment:1 Changed 9 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to Kris Zyp

comment:2 in reply to:  description Changed 9 years ago by riceyeh

line 390 method _processResults() in JsonRestStore?.js should check null value also: var count = results? results.length : 0;

comment:3 Changed 7 years ago by Colin Snover

Resolution: wontfix
Status: newclosed

dojox/data is abandoned. Some dojox/data stores have been upgraded to use the Dojo Store API and can be found at https://github.com/kfranqueiro/dojo-smore.

Note: See TracTickets for help on using tickets.