Jelajahi Sumber

gcal uses warn util

Adam Shaw 10 tahun lalu
induk
melakukan
3deef56df9
1 mengubah file dengan 1 tambahan dan 5 penghapusan
  1. 1 5
      src/gcal/gcal.js

+ 1 - 5
src/gcal/gcal.js

@@ -80,17 +80,13 @@ function transformOptions(sourceOptions, start, end, timezone, calendar) {
 
 	function reportError(message, apiErrorObjs) {
 		var errorObjs = apiErrorObjs || [ { message: message } ]; // to be passed into error handlers
-		var consoleObj = window.console;
-		var consoleWarnFunc = consoleObj ? (consoleObj.warn || consoleObj.log) : null;
 
 		// call error handlers
 		(sourceOptions.googleCalendarError || $.noop).apply(calendar, errorObjs);
 		(calendar.options.googleCalendarError || $.noop).apply(calendar, errorObjs);
 
 		// print error to debug console
-		if (consoleWarnFunc) {
-			consoleWarnFunc.apply(consoleObj, [ message ].concat(apiErrorObjs || []));
-		}
+		fc.warn.apply(null, [ message ].concat(apiErrorObjs || []));
 	}
 
 	if (!apiKey) {