Allow Markdown-Rendering Without Providing an Env-Parameter (#117041)

* Add a rule for initializing the image-stabilizer

* Only use `containingImages` if the variable exists
This commit is contained in:
Manuel Thalmann 2021-02-22 23:02:36 +01:00 committed by GitHub
parent 1cc57241cf
commit cdd7066f00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -216,7 +216,7 @@ export class MarkdownEngine {
const src = token.attrGet('src');
if (src) {
env.containingImages.push({ src });
env.containingImages?.push({ src });
const imgHash = hash(src);
token.attrSet('id', `image-hash-${imgHash}`);
}