Skip to content

Commit ba57d31

Browse files
committed
isDataObject was requiring at least 1 key but that's not necessary for the forms
1 parent d6e40d8 commit ba57d31

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

es/components/form/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ export class XHRForm {
4949

5050
//if options are undefined, set them
5151
options = typeof options === "undefined" ? {} : options;
52-
53-
//make sure options is an object (empty or not)
54-
type_checks.isDataObject(options, Object.keys(XHRFormDefaults), false, false, true);
52+
if( typeof options !== "object" ) throw `${options} is not an object`;
5553

5654
//extend defaults with provided options
5755
options = {...XHRFormDefaults, ...options};
@@ -421,9 +419,7 @@ export class FormFromURL extends XHRForm {
421419

422420
//if options are undefined, set them
423421
options = typeof options === "undefined" ? {} : options;
424-
425-
//make sure options is an object (empty or not)
426-
type_checks.isDataObject(options, Object.keys(FormFromURLDefaults), false, false, true);
422+
if( typeof options !== "object" ) throw `${options} is not an object`;
427423

428424
//extend defaults with provided options
429425
options = {...FormFromURLDefaults, ...options};

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@htmlguyllc/jpack",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "Core Javascript Library of Everyday Objects, Events, and Utilities",
55
"keywords": [
66
"javascript",

0 commit comments

Comments
 (0)