mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 12:18:39 +00:00
chore(screenshotter): modernize calls to NodeJS Buffer interface (#2962)
Avoid DeprecationWarning during screenshotting Co-authored-by: ylemkimon <y@ylem.kim>
This commit is contained in:
@@ -365,7 +365,7 @@ function setSize(reqW, reqH) {
|
||||
}
|
||||
|
||||
function imageDimensions(img) {
|
||||
const buf = new Buffer(img, "base64");
|
||||
const buf = Buffer.from(img, "base64");
|
||||
return {
|
||||
buf: buf,
|
||||
width: buf.readUInt32BE(16),
|
||||
|
Reference in New Issue
Block a user