Skip to content

Commit ff8980a

Browse files
committed
Debug-only Init
1 parent a9ad475 commit ff8980a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

CodeEdit/Features/Welcome/Model/RecentProjectsStore.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,17 @@ class RecentProjectsStore {
2727
/// The storage location for recent projects
2828
let defaults: UserDefaults
2929

30+
#if DEBUG
3031
/// Create a new store with a `UserDefaults` storage location.
3132
init(defaults: UserDefaults = UserDefaults.standard) {
3233
self.defaults = defaults
3334
}
35+
#else
36+
/// Create a new store with a `UserDefaults` storage location.
37+
private init(defaults: UserDefaults = UserDefaults.standard) {
38+
self.defaults = defaults
39+
}
40+
#endif
3441

3542
/// Gets the recent paths array from `UserDefaults`.
3643
private func recentPaths() -> [String] {

0 commit comments

Comments
 (0)