-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should Network.create() take a specific type as its parameter? #1126
Comments
Can't we just check if options is an object instance, and if so whether it has an attribute 'type' of type string using the assert function? In case this doesn't check out, the function would simply return a message invalidating the object, and avoid the issue altogether. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In network.js..
This method will take a string, or a set of key-value pairs it uses as options. Still, it is possible to send an empty object, or other not-specifically-handled type, and it would cause an exception on line 136. Should we create a type for these options, and use instanceof like, for example the get() method a little further down in network.js...
The text was updated successfully, but these errors were encountered: