Use safe navigation

This commit is contained in:
RunDevelopment 2024-02-10 17:16:16 +01:00
parent 54ef4cd22f
commit ffab2edc5b
1 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ export class Prism {
this.hooks.run('after-highlight', env);
this.hooks.run('complete', env);
callback && callback(env.element);
callback?.(env.element);
};
this.hooks.run('before-sanity-check', env);
@ -122,7 +122,7 @@ export class Prism {
if (!env.code) {
this.hooks.run('complete', env);
callback && callback(env.element);
callback?.(env.element);
return;
}