Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Do not throw assert failure when going to private mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
iccub committed Nov 18, 2022
1 parent c700c1c commit 145c673
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Client/BraveSkus/BraveSkusManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class BraveSkusManager {

public init?(isPrivateMode: Bool) {
guard let skusService = Skus.SkusServiceFactory.get(privateMode: isPrivateMode) else {
assertionFailure("Failed to create SkusService")
assert(isPrivateMode, "SkusServiceFactory failed to intialize in regular mode, something is wrong.")
return nil
}

Expand All @@ -36,7 +36,7 @@ public class BraveSkusManager {
}

guard let manager = BraveSkusManager(isPrivateMode: isPrivate) else {
assertionFailure()
assert(isPrivate, "SkusServiceFactory failed to intialize in regular mode, something is wrong.")
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BraveSkusScriptHandler: TabContentScript {

required init?(tab: Tab) {
guard let manager = BraveSkusManager(isPrivateMode: tab.isPrivate) else {
assertionFailure()
assert(tab.isPrivate, "BraveSkusManager failed to intialize in regular mode, something is wrong.")
return nil
}

Expand Down

0 comments on commit 145c673

Please sign in to comment.