How to check that customer is logged in? In authentication-popup.js I found following code:
define([..., 'Magento_Customer/js/customer-data',...],
function(..., customerData, ...) {
return Component.extend({
...
/** Is login form enabled for current customer */
isActive: function () {
var customer = customerData.get('customer');
return customer() == false;
},
});
}
);
I copied it to my module, but it seems like isn't works, it still returns false after login.
Any ideas?
Env: - Magento 2.1.1 - Magento/blank theme