pull/21833/head
Michael Telatynski 2021-07-01 20:51:13 +01:00
parent 1f337b28ac
commit 12cce2a938
1 changed files with 2 additions and 2 deletions
src/components/views/elements

View File

@ -15,7 +15,7 @@
*/
import React from 'react';
import {decode} from "blurhash";
import { decode } from "blurhash";
interface IProps {
blurhash: string;
@ -38,7 +38,7 @@ export default class BlurhashPlaceholder extends React.PureComponent<IProps> {
if (!this.canvas.current) return;
try {
const {width, height} = this.props;
const { width, height } = this.props;
const pixels = decode(this.props.blurhash, Math.ceil(width), Math.ceil(height));
const ctx = this.canvas.current.getContext("2d");