trying to fix cors error

This commit is contained in:
hkgnp 2022-02-15 14:32:18 +08:00
parent 2648778341
commit fdf00f96de
2 changed files with 2 additions and 2 deletions

View File

@ -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": {

View File

@ -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}" />`;