ERROR TypeError: Cannot read property 'replace' of null
at escape (highlight.js:58)
at Object.highlightAuto (highlight.js:569)
at MapSubscriber.project (ngx-highlightjs.js:163)
at MapSubscriber._next (map.js:29)
at MapSubscriber.next (Subscriber.js:49)
at TakeSubscriber._next (take.js:35)
at TakeSubscriber.next (Subscriber.js:49)
at FilterSubscriber._next (filter.js:33)
at FilterSubscriber.next (Subscriber.js:49)
at BehaviorSubject.next (Subject.js:39)
Desired functionality
Even though codeFromUrl works in the end, it throws an error message in the console. First it executes with null and after with the fetched code.
Bug Report or Feature Request (mark with an
x
)Repro steps
https://stackblitz.com/edit/ngx-highlightjs-vandwp?file=src%2Fapp%2Fhome%2Fhome.component.ts
The log given by the failure
Desired functionality
Even though
codeFromUrl
works in the end, it throws an error message in the console. First it executes with null and after with the fetched code.