From 2bc7ef397342bee9dede10b4bee2d6b015cf512c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Tue, 27 Jun 2017 18:45:51 +0100 Subject: [PATCH] feat(portal-data): handle deleted based on new InstanceStatus'es --- packages/portal-watch/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/portal-watch/lib/index.js b/packages/portal-watch/lib/index.js index 24023eec..817d1b09 100644 --- a/packages/portal-watch/lib/index.js +++ b/packages/portal-watch/lib/index.js @@ -122,7 +122,7 @@ module.exports = class Watcher { console.log('-> updating instance', util.inspect(updatedInstance)); return this._data.updateInstance(updatedInstance, handleError(() => { - if (machine.state.toUpperCase() !== 'DELETED') { + if (['DELETED', 'DESTROYED'].indexOf(machine.state.toUpperCase()) < 0) { return; }