Skip to content

Commit

Permalink
Unify increment in for-loops
Browse files Browse the repository at this point in the history
Use `i++` instead of `++i` in all for loops.
  • Loading branch information
waruyama authored Oct 17, 2018
1 parent 229b2cf commit c3fb524
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/svg-inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
var attributeName;
var attributeValue;
var attributes = imgElem.attributes;
for (var i = 0; i < attributes[_LENGTH_]; ++i) {
for (var i = 0; i < attributes[_LENGTH_]; i++) {
attribute = attributes[i];
attributeName = attribute.name;
// Only copy attributes not explicitly excluded from copying
Expand Down Expand Up @@ -251,7 +251,7 @@
var mergedOptions = {};
var args = arguments;
// Iterate over all specified options objects and add all properties to the new options object
for (var i = 0; i < args[_LENGTH_]; ++i) {
for (var i = 0; i < args[_LENGTH_]; i++) {
var argument = args[i];
for (var key in argument) {
if (argument.hasOwnProperty(key)) {
Expand Down Expand Up @@ -377,7 +377,7 @@
function SVGInject(img, options) {
options = mergeOptions(defaultOptions, options);
if (img && typeof img[_LENGTH_] != _UNDEFINED_) {
for (var i = 0; i < img[_LENGTH_]; ++i) {
for (var i = 0; i < img[_LENGTH_]; i++) {
SVGInjectElement(img[i], options);
}
} else {
Expand Down

0 comments on commit c3fb524

Please sign in to comment.