Skip to content

Commit 5c2c0cc

Browse files
committed
fix: traffic zero display bug
1 parent cc7f2f8 commit 5c2c0cc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Diff for: src/serverless.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@ class ServerlessComponent extends Component {
5858
: this.state.lastVersion || '$LATEST'
5959

6060
// default traffic is 1.0, it can also be 0, so we should compare to undefined
61-
outputs[curRegion].traffic = scfOutput.Traffic
62-
? scfOutput.Traffic
63-
: this.state.traffic !== undefined
64-
? this.state.traffic
65-
: 1
61+
outputs[curRegion].traffic =
62+
scfOutput.Traffic !== undefined
63+
? scfOutput.Traffic
64+
: this.state.traffic !== undefined
65+
? this.state.traffic
66+
: 1
6667

6768
if (outputs[curRegion].traffic !== 1 && scfOutput.ConfigTrafficVersion) {
6869
outputs[curRegion].configTrafficVersion = scfOutput.ConfigTrafficVersion

0 commit comments

Comments
 (0)