Use string style factory

This commit is contained in:
Dolan
2019-01-07 21:43:04 +00:00
parent 12ad545fe8
commit 612c024b1f

View File

@ -72,7 +72,8 @@ export class File {
throw Error("can not use both template and external styles"); throw Error("can not use both template and external styles");
} }
if (fileProperties.template) { if (fileProperties.template) {
this.styles = fileProperties.template.styles; const stylesFactory = new ExternalStylesFactory();
this.styles = stylesFactory.newInstance(fileProperties.template.styles);
} else if (options.externalStyles) { } else if (options.externalStyles) {
const stylesFactory = new ExternalStylesFactory(); const stylesFactory = new ExternalStylesFactory();
this.styles = stylesFactory.newInstance(options.externalStyles); this.styles = stylesFactory.newInstance(options.externalStyles);