fix: empty options

This commit is contained in:
Felix Roos 2022-03-16 23:12:54 +01:00
parent 4128213acb
commit 305b4e1258

View File

@ -16,7 +16,7 @@ function frame(callback) {
requestAnimationFrame(animate);
}
export const backgroundImage = function (src, animateOptions) {
export const backgroundImage = function (src, animateOptions = {}) {
const container = document.getElementById('code');
const bg = 'background-image:url(' + src + ');background-size:contain;';
container.style = bg;