Merge pull request #1742 from s-r-x/fix/nil-response-time

fix: undefined duration
This commit is contained in:
Liyas Thomas
2021-07-14 12:51:09 +05:30
committed by GitHub
2 changed files with 8 additions and 2 deletions

View File

@@ -110,8 +110,7 @@
:aria-label="$t('duration')"
type="text"
readonly
:value="`Duration: ${entry.duration}ms`"
:placeholder="$t('no_duration')"
:value="duration"
class="input pt-0 mt-0 text-sm bg-transparent text-secondaryLight"
/>
</li>
@@ -144,6 +143,12 @@ export default {
}
},
computed: {
duration() {
const { duration } = this.entry
return duration > 0
? `${this.$t("duration")}: ${duration}ms`
: this.$t("no_duration")
},
entryStatus() {
const foundStatusGroup = findStatusGroup(this.entry.status)
return (

View File

@@ -1568,6 +1568,7 @@ export default {
path: this.path,
usesPreScripts: this.showPreRequestScript,
preRequestScript: this.preRequestScript,
duration,
star: false,
auth: this.auth,
httpUser: this.httpUser,