Commit 4ac1d879 authored by Rich's avatar Rich

Fix #1: APIv4 returns strings for bools

parent 5534c25e
......@@ -55,6 +55,13 @@
}).then(function(actionLinks) {
console.log("actionLinks", actionLinks);
$scope.actionLinks = actionLinks;
// Fix API returning bools as '1' I think this may have changed in
// later versions of api4 but it is a problem for CiviCRM v5.19
actionLinks.forEach(al => {
al.is_active = (typeof al.is_active === 'string')
? (al.is_active === '1')
: al.is_active;
});
$scope.isLoaded = true;
}, function(failure) {
$scope.error = "Failed to load Activity Links. Do you have the 'administer activity links extension' permission?";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment