8000 Apply suggestions from code review · postcss/postcss@8c58434 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8c58434

Browse files
barak007ai
andauthored
Apply suggestions from code review
Co-authored-by: Andrey Sitnik <andrey@sitnik.ru>
1 parent ff2fd57 commit 8c58434

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/input.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class Input {
130130

131131
result.input = { line, column, source: this.css }
132132
if (this.file) {
133-
if(pathToFileURL) {
133+
if (pathToFileURL) {
134134
result.input.url = pathToFileURL(this.file).toString()
135135
}
136136
result.input.file = this.file
@@ -164,10 +164,10 @@ class Input {
164164
}
165165

166166
if (fromUrl.protocol === 'file:') {
167-
if(fileURLToPath){
167+
if (fileURLToPath) {
168168
result.file = fileURLToPath(fromUrl)
169169
} else {
170-
throw new Error(`file: protocol is not available in this postcss build`);
170+
throw new Error(`file: protocol is not available in this PostCSS build`);
171171
}
172172
}
173173

lib/map-generator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ class MapGenerator {
202202
if (this.mapOpts.from) {
203203
return this.toUrl(this.mapOpts.from)
204204
} else if (this.mapOpts.absolute) {
205-
if(pathToFileURL) {
205+
if (pathToFileURL) {
206206
return pathToFileURL(node.source.input.from).toString()
207207
} else {
208-
throw new Error('map option "absolute" is not available in this postcss build')
208+
throw new Error('`map.absolute` option is not available in this PostCSS build')
209209
}
210210
} else {
211211
return this.toUrl(this.path(node.source.input.from))

0 commit comments

Comments
 (0)
0