Skip to content

Commit 426277e

Browse files
Rafer45jathak
andauthored
Cast value correctly in putIfAbsentAsync (#1404)
* Cast value correctly in `putIfAbsentAsync` Fixes #1403 * Update pubspec.yaml * Update CHANGELOG.md Co-authored-by: Jennifer Thakar <[email protected]>
1 parent 4f428ca commit 426277e

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.35.3
2+
3+
* No user-facing changes.
4+
15
## 1.35.2
26

37
* **Potentially breaking bug fix**: Properly throw an error for Unicode ranges

lib/src/utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ Future<Iterable<F>> mapAsync<E, F>(
369369
/// same key.
370370
Future<V> putIfAbsentAsync<K, V>(
371371
Map<K, V> map, K key, Future<V> ifAbsent()) async {
372-
if (map.containsKey(key)) return map[key]!;
372+
if (map.containsKey(key)) return map[key] as V;
373373
var value = await ifAbsent();
374374
map[key] = value;
375375
return value;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.35.2
2+
version: 1.35.3-dev
33
description: A Sass implementation in Dart.
44
author: Sass Team
55
homepage: https://github.com/sass/dart-sass

0 commit comments

Comments
 (0)