Commit b5198e88 authored by Tristan Cavelier's avatar Tristan Cavelier

localstorage.js "doc is null" bug fix

parent f8c1966d
......@@ -363,7 +363,7 @@
*/
LocalStorage.prototype.removeAttachment = function (command, param) {
var doc = this._storage.getItem(this._localpath + "/" + param._id);
if (typeof doc !== 'object') {
if (typeof doc !== 'object' || doc === null) {
return command.error(
"not_found",
"missing document",
......@@ -536,7 +536,7 @@
}
// check document type
if (typeof doc !== 'object') {
if (typeof doc !== 'object' || doc === null) {
// wrong document
if (!repair) {
return {"error": true, "answers": [
......
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