Fix the dangling promises
This commit is contained in:
parent
27f918f53c
commit
041627f7e4
19 changed files with 112 additions and 67 deletions
|
@ -53,7 +53,7 @@ const ImageTypeExample: React.FC<{}> = (props) => {
|
|||
onClick={() => {
|
||||
if (sheet.sequence.position === 0) {
|
||||
sheet.sequence.position = 0
|
||||
sheet.sequence.play()
|
||||
void sheet.sequence.play()
|
||||
} else {
|
||||
sheet.sequence.position = 0
|
||||
}
|
||||
|
@ -64,6 +64,10 @@ const ImageTypeExample: React.FC<{}> = (props) => {
|
|||
)
|
||||
}
|
||||
|
||||
project.ready.then(() => {
|
||||
render(<ImageTypeExample />, document.getElementById('root'))
|
||||
})
|
||||
project.ready
|
||||
.then(() => {
|
||||
render(<ImageTypeExample />, document.getElementById('root'))
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err)
|
||||
})
|
||||
|
|
|
@ -7,7 +7,7 @@ import {Scene} from './Scene'
|
|||
studio.initialize()
|
||||
|
||||
// trigger warning notification
|
||||
getProject('Sample project').sheet('Scene').sequence.play()
|
||||
void getProject('Sample project').sheet('Scene').sequence.play()
|
||||
|
||||
// fire an info notification
|
||||
notify.info(
|
||||
|
@ -16,7 +16,7 @@ notify.info(
|
|||
'(and all others) at the start of index.tsx. You can also see examples of success and warnign notifications.',
|
||||
)
|
||||
|
||||
getProject('Sample project').ready.then(() => {
|
||||
void getProject('Sample project').ready.then(() => {
|
||||
// fire a success notification on project load
|
||||
notify.success(
|
||||
'Project loaded!',
|
||||
|
|
|
@ -3,7 +3,7 @@ import {render} from 'react-dom'
|
|||
import React, {useState} from 'react'
|
||||
import state from './state.json'
|
||||
|
||||
initialize({state})
|
||||
void initialize({state})
|
||||
|
||||
function SomeComponent({id}: {id: string}) {
|
||||
const {foo, $get, $set} = useControls(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue