How to use the fullcalendar.warn.apply function in fullcalendar

To help you get started, we’ve selected a few fullcalendar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fullcalendar / fullcalendar / plugins / gcal / GcalEventSource.ts View on Github external
reportError(message, apiErrorObjs?) {
    let calendar = this.calendar
    let calendarOnError = calendar.opt('googleCalendarError')
    let errorObjs = apiErrorObjs || [ { message: message } ] // to be passed into error handlers

    if (this.googleCalendarError) {
      this.googleCalendarError.apply(calendar, errorObjs)
    }

    if (calendarOnError) {
      calendarOnError.apply(calendar, errorObjs)
    }

    // print error to debug console
    warn.apply(null, [ message ].concat(apiErrorObjs || []))
  }