trying to fix cors error
This commit is contained in:
parent
2648778341
commit
fdf00f96de
|
|
@ -5,7 +5,7 @@
|
|||
"icon": "./icon.svg"
|
||||
},
|
||||
"name": "logseq-mermaid-plugin",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"description": "",
|
||||
"main": "dist/index.html",
|
||||
"targets": {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export const convert = async (data: string) => {
|
|||
const jsonString = btoa(toDecode);
|
||||
|
||||
let status = '';
|
||||
await fetch(`https://mermaid.ink/img/${jsonString}`, { method: 'HEAD' })
|
||||
await fetch(`https://mermaid.ink/img/${jsonString}`, { method: 'GET' })
|
||||
.then((res) => {
|
||||
if (res.ok) {
|
||||
status = `<img src="https://mermaid.ink/img/${jsonString}" />`;
|
||||
|
|
|
|||
Loading…
Reference in New Issue