feat(upgrade): fix support for directive.link
in upgraded components
(#17971) Although, pre- and post-linking functions are correctly called during directive linking, directives with `link.post` would throw an error. Interestingly, having `link.pre` only or defining `link: fn` (which is an alias for `link.post: fn`) would not throw. This commit removes this check and allows directives with pre- and/or post-linking functions to work.
This commit is contained in:

committed by
Jason Aden

parent
2ea73513ea
commit
0193be7c9b
@ -90,12 +90,6 @@ export class UpgradeHelper {
|
||||
if (directive.terminal) this.notSupported('terminal');
|
||||
if (directive.compile) this.notSupported('compile');
|
||||
|
||||
const link = directive.link;
|
||||
// QUESTION: why not support link.post?
|
||||
if (typeof link == 'object') {
|
||||
if (link.post) this.notSupported('link.post');
|
||||
}
|
||||
|
||||
return directive;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user