Browse Source

file path maybe undefined

pull/14/head
msidolphin 7 years ago
committed by GitHub
parent
commit
1d2e9be880
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      index.js

2
index.js

@ -33,7 +33,7 @@ module.exports = postcss.plugin('postcss-px-to-viewport', function (options) {
css.walkDecls(function (decl, i) {
// Add exlclude option to ignore some files like 'node_modules'
if (opts.exclude) {
if (opts.exclude && decl.source.input.file) {
if (Object.prototype.toString.call(opts.exclude) === '[object RegExp]') {
if (!handleExclude(opts.exclude, decl.source.input.file)) return;
} else if (Object.prototype.toString.call(opts.exclude) === '[object Array]') {

Loading…
Cancel
Save