Commit 419f0dde authored by Xiaowu Zhang's avatar Xiaowu Zhang

add storage type check in rangestorage

parent 06aa3fa6
......@@ -18,6 +18,16 @@
* @constructor
*/
function RangeStorage(spec) {
if (spec.sub_storage === undefined) {
throw new TypeError("RangeStorage 'sub storage' description" +
"must be a non-empty string");
}
if (spec.sub_storage.type === "indexeddb" ||
spec.sub_storage.type === "dav") {
throw new TypeError("RangeStorage 'sub storage' " +
spec.sub_storage.type + "unsupport"
);
}
this._sub_storage = spec.sub_storage;
this._key_schema = spec.key_schema;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment