I've created a Lightning component which on load, invoke apex function and brings some data. Depending on that data "Error Toast" getting displayed to the user. This is working as expected.
I've to use the same component in Community. When I drag the component, it appears in the community page template but also showing the "Error Toast". It looks like when the "Lightning Component" dragged on to the page it executes the apex action.
I want to prevent execution of the "init" event of Lightning Component when viewed in the "Community Builder"