From df781686c1cb053e5a9ebd3e98859ab0e6b1af2d Mon Sep 17 00:00:00 2001 From: Duncan Brown Date: Mon, 7 Nov 2016 14:16:01 +0800 Subject: [PATCH] Update index.js Added [src] to script selector. This makes sure that only scripts with a src will be selected so that the get file name function will not fail and error out. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 183cfe2..b9b740b 100644 --- a/index.js +++ b/index.js @@ -16,7 +16,7 @@ module.exports = function(options) { var presets = { script : { - selector: 'script:not([data-ignore=true], [data-remove=true])', + selector: 'script[src]:not([data-ignore=true], [data-remove=true])', getFileName: function(node) { return node.attr('src'); } }, css : {