Adding missed file for previous commit

> Stops saving the raw core data objects in view models and makes them optional in the constructor.
This commit is contained in:
2021-03-23 23:16:15 -07:00
parent d27a7ca5c5
commit af7e3666de

View File

@@ -50,7 +50,7 @@ class SkillViewModel: ObservableObject, Comparable, Hashable, Identifiable {
skill.wrappedProficiency = proficiency
}
init(_ rawSkill: Skill?) {
init(_ rawSkill: Skill? = nil) {
if (rawSkill != nil) {
_name = rawSkill!.name ?? ""
_abilityScore = AbilityScore(rawValue: rawSkill!.abilityScoreName ?? "") ?? .strength