Skip to content

Fix "async" config setup#181

Closed
scruti wants to merge 3 commits intoDFE-Digital:mainfrom
scruti:fix-async-config-setup
Closed

Fix "async" config setup#181
scruti wants to merge 3 commits intoDFE-Digital:mainfrom
scruti:fix-async-config-setup

Conversation

@scruti
Copy link
Copy Markdown
Contributor

@scruti scruti commented Dec 4, 2024

DfE::Analytics initialisation code ignored the config.async = false option when provided.

This was caused by the conditional assignment operator ||=, as foo ||= true does set foo = true if it was either nil or false.

Changed it to default to true only if no explicit value was set.

DfE::Analytics initialisation code was ignoring the
"config.async = false" option when provided, and setting it to
"config.async = true" anyways.

This was caused by the conditional assignment operator "||=".

"foo ||= true" does set 'foo' as 'true' if it was either 'nil' or
'false'.
@scruti
Copy link
Copy Markdown
Contributor Author

scruti commented Dec 4, 2024

Tests pass locally (at least on my setup!)
image

@scruti scruti closed this Jun 23, 2025
@scruti scruti deleted the fix-async-config-setup branch June 23, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant