فهرست منبع

do nothing if specificSources is falsy

Casey Holzer 9 سال پیش
والد
کامیت
f86f9f247e
1فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 6 4
      src/Calendar.js

+ 6 - 4
src/Calendar.js

@@ -707,11 +707,13 @@ function Calendar_constructor(element, overrides) {
 
 
 
 
 	function refetchEventSources(specificSources, shouldClearAll) {
 	function refetchEventSources(specificSources, shouldClearAll) {
-		// if specificSources isn't an array (i.e. one event source), add it to an array
-		if (specificSources && !$.isArray(specificSources)) {
-			specificSources = [ specificSources ];
+		if (specificSources) {
+			// if specificSources isn't an array (i.e. one event source), add it to an array
+			if (!$.isArray(specificSources)) {
+				specificSources = [ specificSources ];
+			}
+			fetchEventSources(specificSources, shouldClearAll);
 		}
 		}
-		fetchEventSources(specificSources, shouldClearAll);
 	}
 	}