Strange. If data is set to null, then in the try block aren't you calling toString() on null? That should throw instead of return [object Object].
-Alex On 3/11/14 4:00 PM, "Justin Mclean" <jus...@classsoftware.com> wrote: >Hi, > >> I didn't actually run the code, but I cannot figure out how it would >> return [object object]. If dataField is null, wouldn't it set data = >>null? > >It first gets set to null inside the if typeof(data) == "object" but then >fall through to the return return data.toString() in the try catch block >that gives you [object Object] if you don't have a toString method. > >Thanks, >Justin