Skip to content

Commit 4f1587d

Browse files
Diana SuvorovaDiana Suvorova
Diana Suvorova
authored and
Diana Suvorova
committed
strange linting erro
1 parent e3382e1 commit 4f1587d

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

lib/util/Components.js

+11-7
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,17 @@ Components.prototype.get = function(node) {
6363
* @param {Object} props Additional properties to add to the component.
6464
*/
6565
Components.prototype.set = function(node, props) {
66-
const popsAreEquivalent = (propA, propB) =>
67-
propA.name === propB.name
68-
&& ((!propA.allNames && !propB.allNames) ||
69-
(propA.allNames && propB.allNames
70-
&& propA.allNames.join('') === propB.allNames.join('')
71-
)
72-
);
66+
const popsAreEquivalent = (propA, propB) => {
67+
if (propA.name === propB.name) {
68+
if (!propA.allNames && !propB.allNames) {
69+
return true;
70+
} else if (propA.allNames.join('') === propB.allNames.join('')) {
71+
return true;
72+
}
73+
return false;
74+
}
75+
return false;
76+
};
7377

7478
const merge = (propsList, newPropList) => {
7579
const propsToAdd = [];

0 commit comments

Comments
 (0)