-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify 'Must be attached' error to be more descriptive #376
Modify 'Must be attached' error to be more descriptive #376
Conversation
Now it outputs a more descriptive version: `${event} event triggerd with ${selector} on ${templateName} but associated view is not be found. Make sure the event doesn't destroy the view.` Fixes meteor#213
cc @jankapunkt @StorytellerCZ |
packages/blaze/domrange.js
Outdated
@@ -332,9 +332,11 @@ DOMRange.prototype.destroy = function (_skipNodes) { | |||
DOMRange._destroy(this, _skipNodes); | |||
}; | |||
|
|||
DOMRange.prototype.containsElement = function (elem) { | |||
DOMRange.prototype.containsElement = function (elem, selector, event) { | |||
const templateName = this.view.name?.split('.')[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would propose to add some fallback string in case we can't resolve the name:
const templateName = this.view?.name
? this.view.name.split('.')[1]
: 'unknown template'
@denihs Can you grant @jankapunkt or me the ability to merge PRs instead of having to ask you? |
@jankapunkt should be able to do it now. But to release a new version still have to be someone from inside. I can check this later with the team on how we can grant access to this part, in case @jankapunkt also wants to take care of releases. |
Fine by me, thank you @denihs. |
This should fix #213