From 05abbb4fa822e90b0db1a0ceb05dbf50e01e58d4 Mon Sep 17 00:00:00 2001 From: ac360 Date: Tue, 26 Jan 2016 08:14:29 -0800 Subject: [PATCH] DashSummary: Fix error --- lib/actions/DashSummary.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/actions/DashSummary.js b/lib/actions/DashSummary.js index a01d1e107..9d6a952f2 100644 --- a/lib/actions/DashSummary.js +++ b/lib/actions/DashSummary.js @@ -40,8 +40,9 @@ module.exports = function(SPlugin, serverlessPath) { dashSummary() { - let stages = this.S.state.getStages(), - components = this.S.state.getComponents(), + let _this = this, + stages = _this.S.state.getStages(), + components = _this.S.state.getComponents(), stagesNum = 0, regionsNum = 0, componentsNum = 0, @@ -59,7 +60,7 @@ module.exports = function(SPlugin, serverlessPath) { SCli.log(`${Object.keys(stages).length} stages ------------------------------`); Object.keys(stages).forEach(function(stage) { stagesNum++; - let regions = this.S.state.getRegions(stages[stage]); + let regions = _this.S.state.getRegions(stages[stage]); SCli.log(` |_ ${stages[stage]} (${regions.length} regions)`); // list regions for stage