From e7e5fa69bcbb70d6c5f4e69b383556351be1e926 Mon Sep 17 00:00:00 2001 From: MosDevx Date: Thu, 29 Jun 2023 14:57:24 +0300 Subject: [PATCH] fix vibrant consructor issue --- src/helpers/pallete.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/pallete.js b/src/helpers/pallete.js index 2d76b52..5705b2d 100644 --- a/src/helpers/pallete.js +++ b/src/helpers/pallete.js @@ -1,10 +1,10 @@ -import * as VibrantAPI from 'node-vibrant'; +import Vibrant from 'node-vibrant'; const getPallete = async (url) => { const img = new Image(); img.crossOrigin = 'Anonymous'; img.src = `${url}?not-from-cache-please`; - const v = new VibrantAPI(img, {}); + const v = await Vibrant.from(img, {}); const palette = await v.getPalette(); // let palette = await VibrantAPI.from(url).getPalette();