-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Is there a reason that FlowComponents.find() throws an exception when a component is not found?
I have an existing project with modal dialog support that retrieves the template name to display from a session variable. I would like to add direct component support by doing something like:
{{#if isComponentModal}}
{{> render component=template}}
{{else}}
{{> template}}
{{/if}}
ModalDialog.helpers.isComponentModal = function() {
return FlowComponents.find(App.activeModalName());
}
ModalDialog.helpers.template = function() {
return App.activeModalName();
}
However, the find call is throw an error when the component is not found. Obviously, I can just wrap the find call with a try/catch block, but it seems strange to have find() throw an error in the first place.
Metadata
Metadata
Assignees
Labels
No labels