From f05eb0c227893f473ef5cec8ea29fd1d26a76a97 Mon Sep 17 00:00:00 2001 From: Cyrille Meichel Date: Thu, 2 Aug 2018 15:12:07 +0200 Subject: [PATCH] Ensure no parameter is passed to 'done' function Since nodejs 9.0.0, fs.writeFile seems to throw an undefined parameter as error instead of no parameter in the call back. It leads to an error 'done is not a function' --- tasks/webfont.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/webfont.js b/tasks/webfont.js index f1b558a..c198183 100755 --- a/tasks/webfont.js +++ b/tasks/webfont.js @@ -318,7 +318,7 @@ module.exports = function(grunt) { // Save var woff2FontPath = wf.getFontPath(o, 'woff2'); - fs.writeFile(woff2FontPath, woffFont, done); + fs.writeFile(woff2FontPath, woffFont, function() {done();}); } /**