-
Notifications
You must be signed in to change notification settings - Fork 27.4k
useless code in function jqLiteBuildFragment? #14810
Comments
Do you think this causes problems in the code? Or do you suggest we remove it? The first thing you can do is to check if all the tests pass if you remove the second statement. You can also look in the git history and see when / why this line was introduced and try to see if it is still needed |
@Narretz in that version of code ,at line 206,it has another problem ,there is a variable 'elem' which is unused the 'elem' is remove in commit in a conclusion,I think the suspicious line is a little part of big snippet for internal using,has no influence on the other code.the part ‘tmp ||’ should be removed. I am sorry I can't offer the test results becauseI have trouble in unit test ,my chrome disconnect when I run 'grunt test:unit' Chrome 51.0.2700 (Windows 7 0.0.0): Executed 3776 of 5370 SUCCESS (0 secs / 13.8 Aborted due to warnings. I wish someone may test it and report the result. |
Yeah, it is unnecessary. @deplay, would you like to submit a PR. |
@gkalpak |
remove useless code in function jqLiteBuildFragment Closes angular#14810
remove useless code in function jqLiteBuildFragment Closes angular#14810
Closed by 2e0e77e |
filepath:angular.js/src/jqLite.js
code:
when the function jqLiteBuildFragment is excuted,
if the js vm run the italic line above,
in my opinion
the 'tmp' at the right of the equals sign is always 'undefined'
so the 'fragment.appendChild(context.createElement("div"))' is always exec and return to the left 'tmp'
so the part ‘tmp ||’ isunneccessary.
any one would give me some suggestion on this problem ?
The text was updated successfully, but these errors were encountered: