fixed injection of document into packer
This commit is contained in:
@ -1,13 +1,16 @@
|
||||
import * as archiver from "archiver";
|
||||
import * as fs from "fs";
|
||||
import {Formatter} from "../formatter";
|
||||
import {Document} from "../../docx";
|
||||
|
||||
export abstract class Packer {
|
||||
protected archive: any;
|
||||
private formatter: Formatter;
|
||||
protected document: Document;
|
||||
|
||||
constructor() {
|
||||
constructor(document: Document) {
|
||||
this.formatter = new Formatter();
|
||||
this.document = document;
|
||||
this.archive = archiver.create("zip", {});
|
||||
|
||||
this.archive.on('error', (err) => {
|
||||
|
Reference in New Issue
Block a user