fix: tests

This commit is contained in:
Felix Roos 2023-08-31 12:58:32 +02:00
parent 8dd08c360f
commit c9d98bf4d7
2 changed files with 99 additions and 96 deletions

View file

@ -29,6 +29,9 @@ export const getDrawContext = (id = 'test-canvas') => {
};
Pattern.prototype.draw = function (callback, { from, to, onQuery } = {}) {
if (typeof window === 'undefined') {
return this;
}
if (window.strudelAnimation) {
cancelAnimationFrame(window.strudelAnimation);
}