Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 39de981

Browse files
committed
sanity check args in BaseServer add/remove
1 parent 0e300ad commit 39de981

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/LiveDevelopment/Servers/BaseServer.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ define(function (require, exports, module) {
169169
* @param {Object} liveDocument
170170
*/
171171
BaseServer.prototype.add = function (liveDocument) {
172+
if (!liveDocument) {
173+
return;
174+
}
175+
172176
// use the project relative path as a key to lookup requests
173177
var key = this._documentKey(liveDocument.doc.file.fullPath);
174178

@@ -181,6 +185,10 @@ define(function (require, exports, module) {
181185
* @param {Object} liveDocument
182186
*/
183187
BaseServer.prototype.remove = function (liveDocument) {
188+
if (!liveDocument) {
189+
return;
190+
}
191+
184192
var key = this._liveDocuments[this._documentKey(liveDocument.doc.file.fullPath)];
185193

186194
if (key) {

src/extensions/psd-lens

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit d71e1a783761a18d229e5531e3ef9d23b6114604

0 commit comments

Comments
 (0)