From 426277e3ed49b619f1527ca31df9a7dee87ace0d Mon Sep 17 00:00:00 2001 From: Rafer45 Date: Mon, 19 Jul 2021 17:13:06 -0400 Subject: [PATCH] Cast value correctly in `putIfAbsentAsync` (#1404) * Cast value correctly in `putIfAbsentAsync` Fixes https://github.com/sass/dart-sass/issues/1403 * Update pubspec.yaml * Update CHANGELOG.md Co-authored-by: Jennifer Thakar --- CHANGELOG.md | 4 ++++ lib/src/utils.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3096f4dc..9c58732a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.35.3 + +* No user-facing changes. + ## 1.35.2 * **Potentially breaking bug fix**: Properly throw an error for Unicode ranges diff --git a/lib/src/utils.dart b/lib/src/utils.dart index 3781fe1f..70bae9b8 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -369,7 +369,7 @@ Future> mapAsync( /// same key. Future putIfAbsentAsync( Map map, K key, Future ifAbsent()) async { - if (map.containsKey(key)) return map[key]!; + if (map.containsKey(key)) return map[key] as V; var value = await ifAbsent(); map[key] = value; return value; diff --git a/pubspec.yaml b/pubspec.yaml index 140e349a..b51fa366 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.35.2 +version: 1.35.3-dev description: A Sass implementation in Dart. author: Sass Team homepage: https://github.com/sass/dart-sass