Skip to content

Commit 278a435

Browse files
committed
perf: noop updatePosition() unless "position" option is used
1 parent e4c33ae commit 278a435

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = function(css, options){
1414
*/
1515

1616
function updatePosition(str) {
17+
if (!options.position) return;
1718
var lines = str.match(/\n/g);
1819
if (lines) lineno += lines.length;
1920
var i = str.lastIndexOf('\n');

0 commit comments

Comments
 (0)