Issue #3607716: Omit unset handlers so klaro-lib does not call new Function()
KlaroApp always returns a string for onInit, onAccept and onDecline, so every service was passed handler code even when none was configured.
Klaro-lib guards executeHandler() with "handler === undefined" before falling back to new Function('opts', handler). An empty string does not satisfy that guard, so it is still compiled, which throws an EvalError on sites whose Content-Security-Policy omits 'unsafe-eval'. The exception is raised during applyConsents(), so the consent manager never initialises and no banner is rendered.
Only add a handler to the service settings when its code is non-empty, leaving it undefined otherwise.
Related to #3607716
Edited by daniel groen