I'm getting the following error message while attempting to save a controller that is used to navigate to a lightning page (knowledge topic) in lightning communities. Can anyone assist? Error and code are below:
Failed to save landingPageController.js: ESLINT_ERROR: {c:landingPage - CONTROLLER} line:col [10:4] --> Parsing error: Unexpected token urlEvent : Source
Controller code where error occurs:
({
gotoURL : function (component, event, helper) {
var urlEvent = $A.get("e.force:navigateToURL");
urlEvent.setParams({
"url": "/clientserviceonline2/s/topic/0TO0Q0000008aIdWAI/popular-articles"
}
urlEvent.fire();
}
})
Component code snipet:
<button class="slds-button slds-button_icon slds-button_icon-small slds-float_right slds-popover__close slds-button_icon" title="Close dialog" onclick="{!c.gotoURL}">