Merge pull request #31 from sbourdelin/typo_and_fix
model.js: fix an error when parsing null string
This commit is contained in:
commit
c71d1dfb6a
|
@ -51,7 +51,7 @@ models.service('models', ['colors', function(colors) {
|
||||||
var buffer = message['objects'][0]['content'][0]['buffer'];
|
var buffer = message['objects'][0]['content'][0]['buffer'];
|
||||||
text_elements = _.union(prefix, text);
|
text_elements = _.union(prefix, text);
|
||||||
text_elements =_.map(text_elements, function(text_element) {
|
text_elements =_.map(text_elements, function(text_element) {
|
||||||
if ('fg' in text_element) {
|
if (text_element && ('fg' in text_element)) {
|
||||||
text_element['fg'] = colors.prepareCss(text_element['fg']);
|
text_element['fg'] = colors.prepareCss(text_element['fg']);
|
||||||
}
|
}
|
||||||
// TODO: parse background as well
|
// TODO: parse background as well
|
||||||
|
|
Loading…
Reference in New Issue