Skip to content

Commit

Permalink
fix: ignore some edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
dylandepass committed Nov 27, 2023
1 parent 2486374 commit 4fd1ff6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/blocks/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ async function imageUrlToBase64(url) {
};
reader.readAsDataURL(blob);
} catch (e) {
/* c8 ignore next 1 */
reject(e);
}

Check warning on line 205 in src/plugins/blocks/utils.js

View check run for this annotation

Codecov / codecov/patch

src/plugins/blocks/utils.js#L205

Added line #L205 was not covered by tests
});
Expand All @@ -225,6 +226,7 @@ export async function prepareImagesForCopy(context, element, url, columnWidthPer
const dataURL = await imageUrlToBase64(`${imgSrc.origin}${imgSrc.pathname}`);
img.src = dataURL;
} catch (e) {
/* c8 ignore next 2 */
// eslint-disable-next-line no-console
console.error(e);
}

Check warning on line 232 in src/plugins/blocks/utils.js

View check run for this annotation

Codecov / codecov/patch

src/plugins/blocks/utils.js#L232

Added line #L232 was not covered by tests
Expand Down Expand Up @@ -364,6 +366,7 @@ export function copyToClipboard(context, data, prepare) {
const blob = new Blob([html.outerHTML], { type: 'text/html' });
resolve(blob);
} catch (e) {
/* c8 ignore next 1 */
reject(e);
}

Check warning on line 371 in src/plugins/blocks/utils.js

View check run for this annotation

Codecov / codecov/patch

src/plugins/blocks/utils.js#L371

Added line #L371 was not covered by tests
});
Expand Down

0 comments on commit 4fd1ff6

Please sign in to comment.