File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -60,12 +60,11 @@ class CachedAssetReader extends AssetReader {
6060 Future <bool > hasInput (AssetId id) {
6161 if (_cache.contains (id)) return new Future .value (true );
6262
63- _pendingHasInputChecks.putIfAbsent (id, () async {
63+ return _pendingHasInputChecks.putIfAbsent (id, () async {
6464 var exists = await _reader.hasInput (id);
6565 _pendingHasInputChecks.remove (id);
6666 return exists;
6767 });
68- return _pendingHasInputChecks[id];
6968 }
7069
7170 @override
@@ -74,13 +73,12 @@ class CachedAssetReader extends AssetReader {
7473 return new Future .value (_cache.get (id).stringContents);
7574 }
7675
77- _pendingReads.putIfAbsent (id, () async {
76+ return _pendingReads.putIfAbsent (id, () async {
7877 var content = await _reader.readAsString (id, encoding: encoding);
7978 _cache.put (new Asset (id, content));
8079 _pendingReads.remove (id);
8180 return content;
8281 });
83- return _pendingReads[id];
8482 }
8583
8684 @override
You can’t perform that action at this time.
0 commit comments