I am facing something strange here. Please help me understand if I am missing something. My if condition was supposed to be:
if(configuredPdf == true)
Yes, configuredPdf = true assigns true to your variable and returns true. Therefore if (configuredPdf = true) is a valid syntax even though it's usually a bug.
configuredPdf = true
true
if (configuredPdf = true)
It's safer to use if (configuredPdf) to avoid this kind of typo.
if (configuredPdf)