Skip to content

Commit

Permalink
fix(loader): check this.cacheable existence before call it
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #184
  • Loading branch information
kisenka committed Oct 16, 2017
1 parent a0946f2 commit c1ed50a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ let svgCompiler = new SVGCompiler();

// eslint-disable-next-line consistent-return
module.exports = function loader(content) {
this.cacheable();
if (this.cacheable) {
this.cacheable();
}

const done = this.async();
const loaderContext = this;
Expand Down

0 comments on commit c1ed50a

Please sign in to comment.