Description
Motivation
At present, React Native applications will crash when AsyncStorage.multiSet
is called with invalid arguments, for example, AsyncStorage.multiSet(['a', 'b'], ['c', 'd'])
. Note that in this case, there are 2 arguments provided to the function for the keyValuePairs
required to store as data. However, this happens to be a typo and the developer actually intended to wrap it with square brackets, but failed to do so.
Since there is no error thrown, the application literally just crashes and makes debugging almost impossible.
Description
An exception should be raised when the type of the inputs to the keyValuePairs argument of multiSet is incorrect, instead of simply letting the application crash.
New feature implementation
Type comparison of the first argument would be crucial in correcting this.