mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Fix handling of empty --project-assets option (#6873)
This commit is contained in:
parent
2b84d1ff1b
commit
ae1881e4c7
@ -69,6 +69,8 @@ class AssetBundle {
|
||||
|
||||
List<String> assets = projectAssets.split(',');
|
||||
for (String asset in assets) {
|
||||
if (asset == '')
|
||||
continue;
|
||||
final String assetPath = path.join(projectRoot, asset);
|
||||
final String archivePath = asset;
|
||||
entries.add(
|
||||
|
@ -28,6 +28,10 @@ void main() {
|
||||
test('does not need a rebuild', () async {
|
||||
expect(new AssetBundle.fixed(null, null).needsBuild(), isFalse);
|
||||
});
|
||||
test('empty string', () async {
|
||||
AssetBundle ab = new AssetBundle.fixed('', '');
|
||||
expect(ab.entries, isEmpty);
|
||||
});
|
||||
test('single entry', () async {
|
||||
AssetBundle ab = new AssetBundle.fixed('', 'apple.txt');
|
||||
expect(ab.entries, isNotEmpty);
|
||||
|
Loading…
Reference in New Issue
Block a user