Skip to content

Commit a67423a

Browse files
committed
polyfill missing meta resources
fix #3
1 parent 96df528 commit a67423a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/icarus_editor/lib/services/icarus_profile.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'dart:convert';
22

3-
import 'package:icarus_editor/exceptions/icarus_exception.dart';
43
import 'package:icarus_editor/services/icarus_save.dart';
54

65
class IcarusProfile {
@@ -43,6 +42,9 @@ class IcarusProfile {
4342
}
4443
}
4544

46-
throw IcarusException('Could not find meta resource $key');
45+
var newIndex = profile['MetaResources'].length;
46+
profile['MetaResources'].add({'MetaRow': '', 'Count': 0});
47+
48+
return newIndex;
4749
}
4850
}

0 commit comments

Comments
 (0)