@faasjs/react 6.4.3 → 6.4.4

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
@@ -17,10 +17,10 @@ var AsyncFunction = (async () => {
17
17
  }).constructor;
18
18
  function equal(a, b) {
19
19
  if (a === b) return true;
20
- if ((a === null || a === undefined) && (b === null || b === undefined))
20
+ if ((a === null || a === void 0) && (b === null || b === void 0))
21
21
  return true;
22
22
  if (typeof a !== typeof b) return false;
23
- if (b === null || b === undefined) return false;
23
+ if (b === null || b === void 0) return false;
24
24
  const ctor = a.constructor;
25
25
  if (ctor !== b.constructor) return false;
26
26
  switch (ctor) {
@@ -137,7 +137,7 @@ function createSplittingContext(defaultValue) {
137
137
  };
138
138
  }
139
139
  function usePrevious(value) {
140
- const ref = react.useRef(undefined);
140
+ const ref = react.useRef(void 0);
141
141
  react.useEffect(() => {
142
142
  ref.current = value;
143
143
  });
@@ -333,7 +333,7 @@ var ErrorBoundary = class extends react.Component {
333
333
  constructor(props) {
334
334
  super(props);
335
335
  this.state = {
336
- error: undefined,
336
+ error: void 0,
337
337
  info: { componentStack: "" }
338
338
  };
339
339
  }
@@ -450,7 +450,7 @@ FormBody.whyDidYouRender = true;
450
450
  // src/Form/rules.ts
451
451
  var FormDefaultRules = {
452
452
  required: async (value, _, lang) => {
453
- if (value === null || value === undefined || value === "" || Number.isNaN(value)) {
453
+ if (value === null || value === void 0 || value === "" || Number.isNaN(value)) {
454
454
  throw Error(lang?.required);
455
455
  }
456
456
  },
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { useState, useImperativeHandle, cloneElement, forwardRef, useRef, useMemo, useEffect, useCallback, createContext, Component, useContext } from 'react';
1
+ import { forwardRef, useState, useImperativeHandle, cloneElement, useEffect, useMemo, createContext, useRef, useCallback, useContext, Component } from 'react';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { FaasBrowserClient } from '@faasjs/browser';
4
4
 
@@ -15,10 +15,10 @@ var AsyncFunction = (async () => {
15
15
  }).constructor;
16
16
  function equal(a, b) {
17
17
  if (a === b) return true;
18
- if ((a === null || a === undefined) && (b === null || b === undefined))
18
+ if ((a === null || a === void 0) && (b === null || b === void 0))
19
19
  return true;
20
20
  if (typeof a !== typeof b) return false;
21
- if (b === null || b === undefined) return false;
21
+ if (b === null || b === void 0) return false;
22
22
  const ctor = a.constructor;
23
23
  if (ctor !== b.constructor) return false;
24
24
  switch (ctor) {
@@ -135,7 +135,7 @@ function createSplittingContext(defaultValue) {
135
135
  };
136
136
  }
137
137
  function usePrevious(value) {
138
- const ref = useRef(undefined);
138
+ const ref = useRef(void 0);
139
139
  useEffect(() => {
140
140
  ref.current = value;
141
141
  });
@@ -331,7 +331,7 @@ var ErrorBoundary = class extends Component {
331
331
  constructor(props) {
332
332
  super(props);
333
333
  this.state = {
334
- error: undefined,
334
+ error: void 0,
335
335
  info: { componentStack: "" }
336
336
  };
337
337
  }
@@ -448,7 +448,7 @@ FormBody.whyDidYouRender = true;
448
448
  // src/Form/rules.ts
449
449
  var FormDefaultRules = {
450
450
  required: async (value, _, lang) => {
451
- if (value === null || value === undefined || value === "" || Number.isNaN(value)) {
451
+ if (value === null || value === void 0 || value === "" || Number.isNaN(value)) {
452
452
  throw Error(lang?.required);
453
453
  }
454
454
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/react",
3
- "version": "6.4.3",
3
+ "version": "6.4.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -30,10 +30,10 @@
30
30
  "dist"
31
31
  ],
32
32
  "peerDependencies": {
33
- "@faasjs/browser": "6.4.3"
33
+ "@faasjs/browser": "6.4.4"
34
34
  },
35
35
  "devDependencies": {
36
- "@faasjs/browser": "6.4.3",
36
+ "@faasjs/browser": "6.4.4",
37
37
  "@types/react": "*",
38
38
  "react": "*"
39
39
  },