We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 133b8ce commit ffe2995Copy full SHA for ffe2995
ghpages/dev/crate-validation/index.html
@@ -72,12 +72,16 @@
72
73
async function findMostRecentHash() {
74
return await fetch("results/index.json")
75
- .then(res => res.json())
+ .then(res => res.text())
76
.then(data => {
77
// Find the most recent timestamp
78
- let mostRecent = data.reduce((prev, current) => (prev.timestamp > current.timestamp) ? prev : current);
+ const mostRecent = JSON.parse(data.replace("[,", "[")).reduce((prev, current) =>
79
+ prev.timestamp > current.timestamp ? prev : current,
80
+ );
81
+
82
// Retrieve the hash related to the most recent timestamp
83
let mostRecentHash = mostRecent.hash;
84
85
return mostRecentHash;
86
})
87
.catch(err => { console.error(err) });
0 commit comments