Commit 625b9189 authored by Jason Simmons's avatar Jason Simmons

Merge pull request #2172 from jason-simmons/font_no_flutter_yaml

Do not create a font manifest if the app has no flutter.yaml
parents 638d317f 23641c2d
......@@ -168,8 +168,12 @@ ArchiveFile _createAssetManifest(Map<_Asset, List<_Asset>> assets) {
}
ArchiveFile _createFontManifest(Map manifestDescriptor) {
List<int> content = UTF8.encode(JSON.encode(manifestDescriptor['fonts']));
return new ArchiveFile.noCompress('FontManifest.json', content.length, content);
if (manifestDescriptor != null && manifestDescriptor.containsKey('fonts')) {
List<int> content = UTF8.encode(JSON.encode(manifestDescriptor['fonts']));
return new ArchiveFile.noCompress('FontManifest.json', content.length, content);
} else {
return null;
}
}
ArchiveFile _createSnapshotFile(String snapshotPath) {
......@@ -278,7 +282,10 @@ Future<int> assemble({
}
archive.addFile(_createAssetManifest(assets));
archive.addFile(_createFontManifest(manifestDescriptor));
ArchiveFile fontManifest = _createFontManifest(manifestDescriptor);
if (fontManifest != null)
archive.addFile(fontManifest);
await CipherParameters.get().seedRandom();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment