fix: crash if save is called on non-unstable build

This commit is contained in:
naturecodevoid
2023-05-20 10:48:52 -07:00
parent ad98ce43a9
commit 093e21799f

View File

@@ -72,6 +72,9 @@ class UnstableFeatures {
UserDefaults.shared.unstableFeatures = try! JSONEncoder().encode(rawFeatures)
print("\(load ? "Loaded" : "Saved") unstable features: \(String(describing: rawFeatures))")
#else
// we want this to crash, this function should never be triggered on non-unstable builds
fatalError("Tried to save unstable features on non-unstable build!")
#endif
}