commit e49c09f4a1e2669b01f7e3c16840ab7108b5848b parent 2225f459b79ca0faa7fc25f622cf046121d5bb46 Author: rmzelle <rintze.zelle@gmail.com> Date: Sat, 18 Jun 2016 20:28:28 -0400 Correctly inherit "class" from parent style Diffstat:
| M | chrome/content/zotero/xpcom/style.js | | | 9 | ++++++++- |
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/style.js b/chrome/content/zotero/xpcom/style.js @@ -714,7 +714,14 @@ Zotero.Style.prototype.__defineGetter__("class", * @type String */ function() { - if(!this._class) this.getXML(); + if(this.source) { + // use class from source style + var parentStyle = Zotero.Styles.get(this.source); + if(!parentStyle) { + throw new Error('Style references missing parent ' + this.source); + } + return parentStyle.class; + } return this._class; });