- writeImage 호출시 await 추가

This commit is contained in:
minsik 2024-08-19 17:31:21 +09:00
parent bed77ba12c
commit cb9d1128b7

View File

@ -509,7 +509,7 @@ export function useCanvas(id) {
* @param {string} title - 저장할 이미지 이름
*/
const saveImage = async (title = 'canvas') => {
writeImage('testqq', canvas?.toDataURL('image/png').replace('data:image/png;base64,', '')).then(res => {
await writeImage(title, canvas?.toDataURL('image/png').replace('data:image/png;base64,', '')).then(res => {
console.log('success', res)
}).catch(err => {
console.log('err', err)