File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
## 1.78.0
2
2
3
+ ### JS API
4
+
5
+ * Fix a bug where accessing ` SourceSpan.url ` would crash when a relative URL was
6
+ passed to the Sass API.
7
+
3
8
### Embedded Sass
4
9
5
10
* Explicitly expose a ` sass ` executable from the ` sass-embedded ` npm package.
Original file line number Diff line number Diff line change 2
2
// MIT-style license that can be found in the LICENSE file or at
3
3
// https://opensource.org/licenses/MIT.
4
4
5
+ import 'package:path/path.dart' as p;
5
6
import 'package:source_span/source_span.dart' ;
6
7
7
8
import '../util/lazy_file_span.dart' ;
@@ -21,7 +22,8 @@ void updateSourceSpanPrototype() {
21
22
getJSClass (item).defineGetters ({
22
23
'start' : (FileSpan span) => span.start,
23
24
'end' : (FileSpan span) => span.end,
24
- 'url' : (FileSpan span) => span.sourceUrl.andThen (dartToJSUrl),
25
+ 'url' : (FileSpan span) => span.sourceUrl.andThen ((url) => dartToJSUrl (
26
+ url.scheme == '' ? p.toUri (p.absolute (p.fromUri (url))) : url)),
25
27
'text' : (FileSpan span) => span.text,
26
28
'context' : (FileSpan span) => span.context,
27
29
});
You can’t perform that action at this time.
0 commit comments