classes in extraClasses need to be separated by space, not comma

This commit is contained in:
azivner 2017-12-25 09:59:48 -05:00
parent 12f70b28c8
commit 583123ab0a

View file

@ -157,21 +157,17 @@ const noteTree = (function() {
function getExtraClasses(note) {
assertArguments(note);
let extraClasses = '';
const extraClasses = [];
if (note.is_protected) {
extraClasses += ",protected";
extraClasses.push("protected");
}
if (childToParents[note.note_id].length > 1) {
extraClasses += ",multiple-parents";
extraClasses.push("multiple-parents");
}
if (extraClasses.startsWith(",")) {
extraClasses = extraClasses.substr(1);
}
return extraClasses;
return extraClasses.join(" ");
}
function prepareNoteTreeInner(parentNoteId) {