-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "PHP Warning: Undefined array key currentUri" when using `@import…
… (inline)` When enabling source maps and an input file uses `@import (inline)`, then the source map generation causes this error because not all chunks have file info metadata associated in that case. This matches upstream behaviour at * Output Mapped: https://github.com/less/less.js/blob/v3.13.1/packages/less/src/less/source-map-output.js#L89 * Generator: https://github.com/mozilla/source-map/blob/v0.7.4/lib/source-map-generator.js#L110-L129 Without the changes in lib/, the new test case fails with: ``` 1) MapTest::testImportInline Undefined array key "currentUri" /less.php/lib/Less/Output/Mapped.php:68 … /less.php/lib/Less/SourceMap/Generator.php:118 /less.php/lib/Less/Parser.php:235 /less.php/test/phpunit/MapTest.php:37 ``` Ref #109. Closes #121. Bug: T380641 Change-Id: I2e04e33facd6f900c147c124e9931ffc2cac5551
- Loading branch information
Showing
6 changed files
with
36 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
test/Fixtures/less.php/less/T380641-sourcemap-import-inline.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import (inline, css) url("imports/a.less"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters