tuijs-util 1.3.3 → 1.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuijs-util",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "module": "src/esm/index.js",
5
5
  "main": "src/cjs/index.cjs",
6
6
  "exports": {
package/src/cjs/index.cjs CHANGED
@@ -167,7 +167,7 @@ function checkIsList(input) {
167
167
  */
168
168
  function checkIsArray(input) {
169
169
  try {
170
- return input.constructor === Array;
170
+ return Array.isArray(input);
171
171
  } catch (er) {
172
172
  throw new Error(er.message);
173
173
  }
@@ -181,7 +181,7 @@ function checkIsArray(input) {
181
181
  */
182
182
  function checkIsObject(input) {
183
183
  try {
184
- return input.constructor === Object;
184
+ return input !== null && typeof input === 'object' && input.constructor === Object;
185
185
  } catch (er) {
186
186
  throw new Error(er.message);
187
187
  }