Skip to content

Commit 0285406

Browse files
committed
fix: traffic zero display bug
1 parent 9320c04 commit 0285406

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/serverless.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ class ServerlessComponent extends Component {
7070
: this.state.lastVersion || '$LATEST'
7171

7272
// default traffic is 1.0, it can also be 0, so we should compare to undefined
73-
outputs[curRegion].traffic = scfOutput.Traffic
74-
? scfOutput.Traffic
75-
: this.state.traffic !== undefined
76-
? this.state.traffic
77-
: 1
73+
outputs[curRegion].traffic =
74+
scfOutput.Traffic !== undefined
75+
? scfOutput.Traffic
76+
: this.state.traffic !== undefined
77+
? this.state.traffic
78+
: 1
7879

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

0 commit comments

Comments
 (0)