Skip to content

Commit

Permalink
Fix MapExtensions.getOption() for nullable types (#2241)
Browse files Browse the repository at this point in the history
Closes #2239
  • Loading branch information
nex3 committed May 10, 2024
1 parent 85f39d5 commit 372f15c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## 1.77.1

* Fix a crash that could come up with importers in certain contexts.

## 1.77.0

* *Don't* throw errors for at-rules in keyframe blocks.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/util/map.dart
Expand Up @@ -21,5 +21,5 @@ extension MapExtensions<K, V> on Map<K, V> {

/// Returns an option that contains the value at [key] if one exists and null
/// otherwise.
Option<V> getOption(K key) => containsKey(key) ? (this[key]!,) : null;
Option<V> getOption(K key) => containsKey(key) ? (this[key] as V,) : null;
}
4 changes: 4 additions & 0 deletions pkg/sass_api/CHANGELOG.md
@@ -1,3 +1,7 @@
## 10.4.1

* No user-visible changes.

## 10.4.0

* No user-visible changes.
Expand Down
4 changes: 2 additions & 2 deletions pkg/sass_api/pubspec.yaml
Expand Up @@ -2,15 +2,15 @@ name: sass_api
# Note: Every time we add a new Sass AST node, we need to bump the *major*
# version because it's a breaking change for anyone who's implementing the
# visitor interface(s).
version: 10.4.0
version: 10.4.1
description: Additional APIs for Dart Sass.
homepage: https://github.com/sass/dart-sass

environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
sass: 1.77.0
sass: 1.77.1

dev_dependencies:
dartdoc: ^6.0.0
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,5 +1,5 @@
name: sass
version: 1.77.0
version: 1.77.1
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down

0 comments on commit 372f15c

Please sign in to comment.