Quantcast
Viewing all articles
Browse latest Browse all 3527

IndexedDB issuse when putting items with null values

When I try to put items with null values to the objectStore on indexedDB, I get an error:
>> SCRIPT87: Invalid argument.
>> File: <file_name>.js, line: x, Column: x
It only accepts undefined values along other objects and to be more specific, that's the output when putting null and undefined values from the console (IE11)
<< store.put("item", null)
>> Invalid argument.
<< store.put("item", undefined)
>> undefined

As on specification, we should be able to store objects that can be stored using the HTML5 structured cloning algorithm, which means storing objects: http://www.w3.org/TR/IndexedDB/#value-construct

Since null is a primitive value (not even an object), we should be able to store nulls

This issuse blocked me from adding IE support to a web application where I can't change null value to undefined values



Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>