fix: handle missing ERB
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
78c3b42770
commit
2abefc27a2
@@ -130,6 +130,9 @@ export const createFiles = createAction(types.createFiles, challengeFiles =>
|
|||||||
|
|
||||||
// TODO: secure with tests
|
// TODO: secure with tests
|
||||||
function getLines(contents, range) {
|
function getLines(contents, range) {
|
||||||
|
if (isEmpty(range)) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
const lines = contents.split('\n');
|
const lines = contents.split('\n');
|
||||||
const editableLines = isEmpty(lines)
|
const editableLines = isEmpty(lines)
|
||||||
? []
|
? []
|
||||||
|
Reference in New Issue
Block a user