Skip to content

Commit e4d1d7a

Browse files
authored
Retrieve last backup instead of first backup in Style Tab (#109)
1 parent 3018371 commit e4d1d7a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/snapshots-app/client/bundles/components/submission/tabs/style

src/snapshots-app/client/bundles/components/submission/tabs/style/StyleTab.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function StyleTab() {
9999
const codeQueryParams = new URLSearchParams();
100100
codeQueryParams.append(
101101
"object_key",
102-
`${backups[backups.length - 1].file_contents_location}/${file}`,
102+
`${backups[0].file_contents_location}/${file}`,
103103
);
104104

105105
fetch(`/api/files?${codeQueryParams}`)
@@ -112,7 +112,7 @@ function StyleTab() {
112112
const lintErrorsQueryParams = new URLSearchParams();
113113
lintErrorsQueryParams.append(
114114
"file_contents_location",
115-
`${backups[backups.length - 1].file_contents_location}/${file}`,
115+
`${backups[0].file_contents_location}/${file}`,
116116
);
117117

118118
fetch(`/api/lint_errors?${lintErrorsQueryParams}`)

0 commit comments

Comments
 (0)