Skip to content

Commit 372f15c

Browse files
authored
Fix MapExtensions.getOption() for nullable types (#2241)
Closes #2239
1 parent 85f39d5 commit 372f15c

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.77.1
2+
3+
* Fix a crash that could come up with importers in certain contexts.
4+
15
## 1.77.0
26

37
* *Don't* throw errors for at-rules in keyframe blocks.

lib/src/util/map.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ extension MapExtensions<K, V> on Map<K, V> {
2121

2222
/// Returns an option that contains the value at [key] if one exists and null
2323
/// otherwise.
24-
Option<V> getOption(K key) => containsKey(key) ? (this[key]!,) : null;
24+
Option<V> getOption(K key) => containsKey(key) ? (this[key] as V,) : null;
2525
}

pkg/sass_api/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 10.4.1
2+
3+
* No user-visible changes.
4+
15
## 10.4.0
26

37
* No user-visible changes.

pkg/sass_api/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: sass_api
22
# Note: Every time we add a new Sass AST node, we need to bump the *major*
33
# version because it's a breaking change for anyone who's implementing the
44
# visitor interface(s).
5-
version: 10.4.0
5+
version: 10.4.1
66
description: Additional APIs for Dart Sass.
77
homepage: https://github.com/sass/dart-sass
88

99
environment:
1010
sdk: ">=3.0.0 <4.0.0"
1111

1212
dependencies:
13-
sass: 1.77.0
13+
sass: 1.77.1
1414

1515
dev_dependencies:
1616
dartdoc: ^6.0.0

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.77.0
2+
version: 1.77.1
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)