Skip to content
This repository was archived by the owner on Feb 11, 2023. It is now read-only.

Commit 8ddd73d

Browse files
authored
Update Plugin.swift
1 parent 80ea32e commit 8ddd73d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/msal-capacitor-plugin/ios/Plugin/Plugin.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class MsalPlugin: CAPPlugin {
3636
do {
3737
// 1. Sometimes Javascripts Apps cause re-renders resulting in options being set again
3838
// This protects from options being set again
39-
if (call.getBool("guardForRerenders") == true) != nil && self.msalHasOptions == true {
39+
if (call.getBool("guardForRerenders") ?? false) == true && self.msalHasOptions == true {
4040
return
4141
}
4242

@@ -122,8 +122,7 @@ public class MsalPlugin: CAPPlugin {
122122

123123
// 4. Set Silent Token Parameters
124124
let parameters = MSALSilentTokenParameters(scopes: tokenScopes, account: self.msalAccount!)
125-
126-
if ((call.getBool("forceRefresh") == true) != nil) {
125+
if (call.getBool("forceRefresh") ?? false) == true {
127126
parameters.forceRefresh = true
128127
}
129128

0 commit comments

Comments
 (0)