Skip to content

Commit

Permalink
Improve diff display in case the whole key in missing
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 1, 2021
1 parent d5243e3 commit c013f2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tools/rustdoc-js/tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ function betterLookingDiff(entry, data) {
if (!entry.hasOwnProperty(key)) {
continue;
}
if (!data || !data.hasOwnProperty(key)) {
output += '-' + spaces + contentToDiffLine(key, entry[key]) + '\n';
continue;
}
let value = data[key];
if (value !== entry[key]) {
output += '-' + spaces + contentToDiffLine(key, entry[key]) + '\n';
Expand Down

0 comments on commit c013f2a

Please sign in to comment.