Skip to content

Commit c8e5bc5

Browse files
committed
Make NoWorkResult safer
1 parent a34b6ca commit c8e5bc5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/map-generator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class MapGenerator {
8484
this.root.removeChild(i)
8585
}
8686
}
87-
} else {
87+
} else if (this.css) {
8888
this.css = this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm, '')
8989
}
9090
}
@@ -104,7 +104,7 @@ class MapGenerator {
104104
}
105105
}
106106
})
107-
} else {
107+
} else if (this.css) {
108108
let from = this.opts.from
109109
? this.toUrl(this.path(this.opts.from))
110110
: '<no source>'

lib/no-work-result.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const Result = require('./result')
88

99
class NoWorkResult {
1010
constructor(processor, css, opts) {
11+
css = css.toString()
1112
this.stringified = false
1213

1314
this._processor = processor

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy