From c275ec49281db989671e277cb719c241bab0dc2c Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Wed, 27 Aug 2014 15:51:34 -0700 Subject: [PATCH] fix issue 2203 --- src/EventManager.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/EventManager.js b/src/EventManager.js index 43cb035..0e2a021 100644 --- a/src/EventManager.js +++ b/src/EventManager.js @@ -267,6 +267,7 @@ function EventManager(options) { // assumed to be a calendar // for array sources, we convert to standard Event Objects up front if ($.isArray(source.events)) { + source.origArray = source.events; // for removeEventSource source.events = $.map(source.events, function(eventInput) { return buildEvent(eventInput, source); }); @@ -299,7 +300,12 @@ function EventManager(options) { // assumed to be a calendar function getSourcePrimitive(source) { - return ((typeof source == 'object') ? (source.events || source.url) : '') || source; + return ( + (typeof source === 'object') ? // a normalized event source? + (source.origArray || source.url || source.events) : // get the primitive + null + ) || + source; // the given argument *is* the primitive }