Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
romsar committed Oct 10, 2024
1 parent bd9047d commit 90b6170
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ func SetEncryptHistory(ctx context.Context, encrypt ...bool) context.Context {

// EncryptHistoryFromContext returns history encryption value from the context.
func EncryptHistoryFromContext(ctx context.Context) (bool, bool) {
encrypt, ok := ctx.Value(encryptHistoryContextKey).(bool)
return encrypt, ok
encryptHistory, ok := ctx.Value(encryptHistoryContextKey).(bool)
return encryptHistory, ok
}

// SetClearHistory cleaning history state.
Expand All @@ -104,9 +104,9 @@ func SetClearHistory(ctx context.Context) context.Context {

// ClearHistoryFromContext returns clear history value from the context.
func ClearHistoryFromContext(ctx context.Context) bool {
clear, ok := ctx.Value(clearHistoryContextKey).(bool)
clearHistory, ok := ctx.Value(clearHistoryContextKey).(bool)
if ok {
return clear
return clearHistory
}
return false
}
4 changes: 2 additions & 2 deletions option.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ func WithFlashProvider(flashData FlashProvider) Option {
}

// WithEncryptHistory returns Option that will enable Inertia's global history encryption.
func WithEncryptHistory(encrypt ...bool) Option {
func WithEncryptHistory(encryptHistory ...bool) Option {
return func(i *Inertia) error {
i.encryptHistory = firstOr[bool](encrypt, true)
i.encryptHistory = firstOr[bool](encryptHistory, true)
return nil
}
}

0 comments on commit 90b6170

Please sign in to comment.