actually fix

This commit is contained in:
kaatt
2022-09-14 23:15:10 +05:30
committed by Adhiraj Singh
parent 48f8b30583
commit 0f989751db

View File

@@ -20,7 +20,7 @@ import { generateMessageID } from './generics'
const getTmpFilesDirectory = () => tmpdir() const getTmpFilesDirectory = () => tmpdir()
const getImageProcessingLibrary = async() => { const getImageProcessingLibrary = async() => {
const [jimp, sharp] = await Promise.all([ const [_jimp, _sharp] = await Promise.all([
(async() => { (async() => {
const jimp = await ( const jimp = await (
import('jimp') import('jimp')
@@ -36,11 +36,11 @@ const getImageProcessingLibrary = async() => {
return sharp return sharp
})() })()
]) ])
const sharp = sharp?.default ?? sharp const sharp = _sharp?.default ?? _sharp
if(sharp) { if(sharp) {
return { sharp } return { sharp }
} }
const jimp = jimp?.default ?? jimp const jimp = _jimp?.default ?? _jimp
if(jimp) { if(jimp) {
return { jimp } return { jimp }
} }