twilio-sync
Advanced tools
Comparing version 0.3.0-rc7 to 0.3.0-rc8
@@ -287,3 +287,8 @@ 'use strict'; | ||
return this._getCached(id, 'doc') || this._getDocument(id).then(function (body) { | ||
return body || (mode !== 'open' ? _this2._createDocument(id, purpose, data) : new _syncerror2.default('Not found', 404)); | ||
if (body) { | ||
return body; | ||
} else if (mode !== 'open') { | ||
return _this2._createDocument(id, purpose, data); | ||
} | ||
throw new _syncerror2.default('Not found', 404); | ||
}).then(function (body) { | ||
@@ -316,3 +321,8 @@ return new _syncdocument2.default(_this2._dependencies, body); | ||
return this._getCached(id, 'map') || this._getMap(id).then(function (body) { | ||
return body || (mode !== 'open' ? _this3._createMap(id, purpose, context) : new _syncerror2.default('Not found', 404)); | ||
if (body) { | ||
return body; | ||
} else if (mode !== 'open') { | ||
return _this3._createMap(id, purpose, context); | ||
} | ||
throw new _syncerror2.default('Not found', 404); | ||
}).then(function (body) { | ||
@@ -345,3 +355,8 @@ return new _syncmap2.default(_this3._dependencies, body); | ||
return this._getCached(id, 'list') || this._getList(id).then(function (body) { | ||
return body || (mode !== 'open' ? _this4._createList(id, purpose, context) : new _syncerror2.default('Not found', 404)); | ||
if (body) { | ||
return body; | ||
} else if (mode !== 'open') { | ||
return _this4._createList(id, purpose, context); | ||
} | ||
throw new _syncerror2.default('Not found', 404); | ||
}).then(function (body) { | ||
@@ -348,0 +363,0 @@ return new _synclist2.default(_this4._dependencies, body); |
{ | ||
"name": "twilio-sync", | ||
"version": "0.3.0-rc7", | ||
"version": "0.3.0-rc8", | ||
"description": "Twilio Sync client library", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2122520
27530