Skip to content

Commit

Permalink
西元2025年01月05日 (週日) 06時22分33秒 CST
Browse files Browse the repository at this point in the history
  • Loading branch information
pulipulichen committed Jan 4, 2025
1 parent 5dd3faf commit 4621ec7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions GitHub.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ async function detectWeb(doc, url) {

return new Promise(function (resolve) {
let path = url.split('/').slice(3, 5).join('/');
ZU.doGet(`https://raw.githubusercontent.com/${path}/HEAD/CITATION.cff`, function (cffText) {
ZU.doGet(`https://raw.githubusercontent.com/${path}/HEAD/CITATION.cff`, function (cffText, xhr) {

Check failure on line 63 in GitHub.js

View workflow job for this annotation

GitHub Actions / Lint, Check, Test

Expected to return a value at the end of function
if (xhr.status !== 200) {
return resolve("computerProgram");
}
let yaml = jsyaml.load(cffText);

Check failure on line 67 in GitHub.js

View workflow job for this annotation

GitHub Actions / Lint, Check, Test

'jsyaml' is not defined
if (yaml.type && yaml.type === 'dataset') {
resolve(yaml.type);
}
else {
resolve("computerProgram");
return resolve(yaml.type);
}
});

resolve("computerProgram");
}, null, null, { 'X-Requested-With': 'XMLHttpRequest' }, false);
});
}

Expand Down

0 comments on commit 4621ec7

Please sign in to comment.