Skip to content

Commit

Permalink
opti hasRootNode conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
errorrik committed Dec 30, 2020
1 parent ab6f26a commit ea89290
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/view/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,7 @@ function Component(options) { // eslint-disable-line
// #[begin] reverse
var reverseWalker = options.reverseWalker;
if (this.el || reverseWalker) {
var RootComponentType = this.components[
this.aNode.directives.is ? evalExpr(this.aNode.directives.is.value, this.data) : this.aNode.tagName
];
var RootComponentType = this.components[this.aNode.tagName];

if (reverseWalker && (this.aNode.hotspot.hasRootNode || RootComponentType)) {
this._rootNode = createReverseNode(this.aNode, this, this.data, this, reverseWalker);
Expand Down Expand Up @@ -934,12 +932,8 @@ Component.prototype.attach = function (parentEl, beforeEl) {
this._toPhase('beforeAttach');
// #[end]

var hasRootNode = this.aNode.hotspot.hasRootNode
|| this.components[
this.aNode.directives.is ? evalExpr(this.aNode.directives.is.value, this.data) : this.aNode.tagName
];

if (hasRootNode) {
if (this.aNode.hotspot.hasRootNode || this.components[this.aNode.tagName]) {
// #[begin] devtool
this._toPhase('beforeCreate');
// #[end]
Expand Down

0 comments on commit ea89290

Please sign in to comment.