parse events
This commit is contained in:
parent
48fa50ab85
commit
2889edcb4c
|
@ -41,7 +41,8 @@ export default ({ attributes, setAttributes }) => {
|
|||
}
|
||||
fetch(url)
|
||||
.then((response) => response.text()) // TODO also handle response.ok being false
|
||||
.then((events) => {
|
||||
.then((data) => {
|
||||
const events = JSON.parse(data)
|
||||
displayEvents({ events, document, container })
|
||||
})
|
||||
.catch((data) => {
|
||||
|
|
Loading…
Reference in New Issue