@schedule-x/react 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -45,14 +45,14 @@ function ScheduleXCalendar({ calendarApp, customComponents }) {
45
45
  }
46
46
 
47
47
  function useCalendarApp(config, plugins) {
48
- const [calendarApp] = react.useState(() => calendar.createCalendar(config, plugins || []));
48
+ const [calendarApp] = react.useState(() => calendar.createCalendar(config, plugins));
49
49
  return calendarApp;
50
50
  }
51
51
  function useNextCalendarApp(config, plugins) {
52
52
  const [calendarApp, setCalendarApp] = react.useState();
53
53
  react.useEffect(() => {
54
54
  if (typeof window !== 'undefined') {
55
- setCalendarApp(calendar.createCalendar(config, plugins || []));
55
+ setCalendarApp(calendar.createCalendar(config, plugins));
56
56
  }
57
57
  }, []);
58
58
  return calendarApp;
package/dist/index.cjs.js CHANGED
@@ -45,14 +45,14 @@ function ScheduleXCalendar({ calendarApp, customComponents }) {
45
45
  }
46
46
 
47
47
  function useCalendarApp(config, plugins) {
48
- const [calendarApp] = react.useState(() => calendar.createCalendar(config, plugins || []));
48
+ const [calendarApp] = react.useState(() => calendar.createCalendar(config, plugins));
49
49
  return calendarApp;
50
50
  }
51
51
  function useNextCalendarApp(config, plugins) {
52
52
  const [calendarApp, setCalendarApp] = react.useState();
53
53
  react.useEffect(() => {
54
54
  if (typeof window !== 'undefined') {
55
- setCalendarApp(calendar.createCalendar(config, plugins || []));
55
+ setCalendarApp(calendar.createCalendar(config, plugins));
56
56
  }
57
57
  }, []);
58
58
  return calendarApp;
package/dist/index.js CHANGED
@@ -43,14 +43,14 @@ function ScheduleXCalendar({ calendarApp, customComponents }) {
43
43
  }
44
44
 
45
45
  function useCalendarApp(config, plugins) {
46
- const [calendarApp] = useState(() => createCalendar(config, plugins || []));
46
+ const [calendarApp] = useState(() => createCalendar(config, plugins));
47
47
  return calendarApp;
48
48
  }
49
49
  function useNextCalendarApp(config, plugins) {
50
50
  const [calendarApp, setCalendarApp] = useState();
51
51
  useEffect(() => {
52
52
  if (typeof window !== 'undefined') {
53
- setCalendarApp(createCalendar(config, plugins || []));
53
+ setCalendarApp(createCalendar(config, plugins));
54
54
  }
55
55
  }, []);
56
56
  return calendarApp;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "main": "dist/index.cjs",
16
16
  "module": "dist/index.js",
17
17
  "types": "dist/types/index.d.ts",
18
- "version": "2.1.1",
18
+ "version": "2.1.2",
19
19
  "type": "module",
20
20
  "files": [
21
21
  "dist"