Merge pull request #1742 from s-r-x/fix/nil-response-time
fix: undefined duration
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -1568,6 +1568,7 @@ export default {
|
||||
path: this.path,
|
||||
usesPreScripts: this.showPreRequestScript,
|
||||
preRequestScript: this.preRequestScript,
|
||||
duration,
|
||||
star: false,
|
||||
auth: this.auth,
|
||||
httpUser: this.httpUser,
|
||||
|
||||
Reference in New Issue
Block a user