From 612c024b1feec46a2654c05c4b5011b31fb3c68a Mon Sep 17 00:00:00 2001 From: Dolan Date: Mon, 7 Jan 2019 21:43:04 +0000 Subject: [PATCH] Use string style factory --- src/file/file.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/file/file.ts b/src/file/file.ts index ec953b5a63..d5780b6230 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -72,7 +72,8 @@ export class File { throw Error("can not use both template and external styles"); } if (fileProperties.template) { - this.styles = fileProperties.template.styles; + const stylesFactory = new ExternalStylesFactory(); + this.styles = stylesFactory.newInstance(fileProperties.template.styles); } else if (options.externalStyles) { const stylesFactory = new ExternalStylesFactory(); this.styles = stylesFactory.newInstance(options.externalStyles);