initHighlightWorker throws TypeError
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem
initHighlightWorker
throws:
Cannot read properties of undefined (reading 'endsWith')
when name
destructured from blob
is undefined.
Solution
Handle situations where an empty object is passed as blob. See BlobContentViewer:
result({ data }) {
...
this.blobInfo = repository.blobs?.nodes[0] || {};
...
this.initHighlightWorker(this.blobInfo, this.isUsingLfs);
},
Edited by 🤖 GitLab Bot 🤖