mirror of
https://github.com/documenso/documenso.git
synced 2025-11-17 02:01:33 +10:00
feat: promise safety with eslint
This commit is contained in:
@ -302,8 +302,8 @@ export class Canvas {
|
||||
/**
|
||||
* Retrieves the signature as an image blob.
|
||||
*/
|
||||
public toBlob(type?: string, quality?: number): Promise<Blob> {
|
||||
return new Promise((resolve, reject) => {
|
||||
public async toBlob(type?: string, quality?: number): Promise<Blob> {
|
||||
const promise = new Promise<Blob>((resolve, reject) => {
|
||||
this.$canvas.toBlob(
|
||||
(blob) => {
|
||||
if (!blob) {
|
||||
@ -317,5 +317,7 @@ export class Canvas {
|
||||
quality,
|
||||
);
|
||||
});
|
||||
|
||||
return await promise;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user