diff --git a/src/libprs500/ebooks/lrf/objects.py b/src/libprs500/ebooks/lrf/objects.py index ae9a5b59cb..6b01ac5073 100644 --- a/src/libprs500/ebooks/lrf/objects.py +++ b/src/libprs500/ebooks/lrf/objects.py @@ -730,8 +730,8 @@ class Text(LRFStream): action = TextAttr.tag_map[tag.id] if len(self.content) == 0: current_style = style.copy() - name, val = action[0], LRFObject.tag_to_val(action, None, tag, None) - if current_style[name] != val: + name, val = action[0], LRFObject.tag_to_val(action, self, tag, None) + if name and current_style[name] != val: # No existing Span if len(self.content) > 0 and isinstance(self.content[-1], self.__class__.Span): self.content[-1].attrs[name] = val