Json feed returns null instead of empty array []

Mike O Mike O asked Nov 5, 2021
Active Nov 5 · Viewed 5469 times
<p>I am using <a href="http://dnndev.com/fiddle/fid/809">this feed</a> to return events to an instance of <a href="https://fullcalendar.io/">Fullcalendar.io</a>. The code below works perfect as long as even one event is found by the select. </p> <p>But when the select does not find any items/events, the feed returns absolutely nothing. </p> <p>Fullcalender expects an empty array [] in this condition, not null, and so the failure callback shown in the fiddle is returned. </p> <p>I'm attempting to research this elsewhere, but thought I would ask here if someone had a suggestion about modifying the fiddle or Javascript. </p> <p>Thanks! </p>

1 Answer

Loading answers...