mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-20 17:23:17 +00:00
chore(deps): update dependency typescript to ~5.9.0 (#36212)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: diondiondion <mail@diondiondion.com>
This commit is contained in:
parent
df72a2dbbe
commit
cc54b33720
10 changed files with 22 additions and 41 deletions
|
|
@ -30,9 +30,12 @@ const Blurhash: React.FC<Props> = ({
|
|||
try {
|
||||
const pixels = decode(hash, width, height);
|
||||
const ctx = canvas.getContext('2d');
|
||||
const imageData = new ImageData(pixels, width, height);
|
||||
const imageData = ctx?.createImageData(width, height);
|
||||
imageData?.data.set(pixels);
|
||||
|
||||
ctx?.putImageData(imageData, 0, 0);
|
||||
if (imageData) {
|
||||
ctx?.putImageData(imageData, 0, 0);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('Blurhash decoding failure', { err, hash });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ function isNodeLinkHashtag(element: Node): element is HTMLLinkElement {
|
|||
return (
|
||||
element instanceof HTMLAnchorElement &&
|
||||
// it may be a <a> starting with a hashtag
|
||||
(element.textContent?.[0] === '#' ||
|
||||
(element.textContent.startsWith('#') ||
|
||||
// or a #<a>
|
||||
element.previousSibling?.textContent?.[
|
||||
element.previousSibling.textContent.length - 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue