Skip to content

Commit

Permalink
Merge pull request #19 from solid/defensive
Browse files Browse the repository at this point in the history
  • Loading branch information
bourgeoa authored Jun 25, 2021
2 parents 50c97ef + a32e59a commit f5d4fe3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sourcePane.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,12 @@ module.exports = {
.then(function (response) {
if (!happy(response, 'GET')) return
const desc = response.responseText
textArea.rows = desc ? desc.split('\n').length + 2 : 2
if (!desc) { // Defensive https://github.com/linkeddata/rdflib.js/issues/506
const msg = 'source pane: No text in response object!!'
statusRow.appendChild(UI.widgets.errorMessageBlock(dom, ç))
return // Never mis-represent the contents of the file.
}
textArea.rows = desc.split('\n').length + 2
textArea.cols = 80
textArea.value = desc

Expand Down

0 comments on commit f5d4fe3

Please sign in to comment.