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 79cfca1 commit 8b8faf0Copy full SHA for 8b8faf0
js/main.js
@@ -133,13 +133,15 @@ function updateHistory(path) {
133
window.resopnse2imgSrc = (response) => {
134
// extracts img-src from GitHub API octokit response
135
// console.log(response);
136
- var b64content = response.data.content;
137
- if (b64content) {
+ var download_url = response.data.download_url;
+ if (download_url) {
138
+ return download_url;
139
+ } else if (response.data.content) {
140
return `data:${mime.getType(
141
response.data.name
142
)};base64,${response.data.content.replaceAll("\n", "")}`;
143
} else {
- return response.data.download_url;
144
+ return null;
145
}
146
};
147
0 commit comments