Skip to content

Commit be329db

Browse files
committed
[fix] Bug report bubble display bugfix
A red bubble belongs to the bug report which contains the report details like its location and message. This commit fixes two bugs: - The red bubble was shown even if we changed to a different file. - Clicking on the report title didn't jump to this red bubble.
1 parent 734dd2d commit be329db

File tree

1 file changed

+6
-8
lines changed
  • web/server/vue-cli/src/components/Report

1 file changed

+6
-8
lines changed

web/server/vue-cli/src/components/Report/Report.vue

+6-8
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,8 @@ export default {
531531
},
532532
533533
async loadReport(report) {
534-
if (this.report && this.report.reportId.equals(report.reportId)) {
535-
this.highlightReport(report);
536-
this.loading = false;
534+
if (!report)
537535
return;
538-
}
539536
540537
this.report = report;
541538
@@ -783,10 +780,11 @@ export default {
783780
//If the warning message or location is different than the
784781
//the last bug path element, then we render the warning.
785782
786-
if (events.length == 0 ||
787-
this.report.checkerMsg !== events[events.length-1].msg ||
788-
this.report.line.toNumber() !=
789-
events[events.length-1].startLine.toNumber()
783+
if (this.sourceFile.fileId.equals(this.report.fileId) &&
784+
(events.length == 0 ||
785+
this.report.checkerMsg !== events[events.length-1].msg ||
786+
this.report.line.toNumber() !=
787+
events[events.length-1].startLine.toNumber())
790788
){
791789
const chkrmsg_data = { $id: 999,
792790
$message:this.report.checkerMsg,

0 commit comments

Comments
 (0)