Skip to content

Commit

Permalink
Switch to Object.values
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Feb 10, 2022
1 parent 493ae99 commit a153426
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions index.js
Expand Up @@ -77,17 +77,9 @@ function gulpSVGSprite(config) {
if (error) {
this.emit('error', new PluginError(PLUGIN_NAME, error));
} else if (shapes > 0) {
for (const mode in result) {
if (!Object.prototype.hasOwnProperty.call(result, mode)) {
continue;
}

for (const resource in result[mode]) {
if (!Object.prototype.hasOwnProperty.call(result[mode], resource)) {
continue;
}

this.push(result[mode][resource]);
for (const mode of Object.values(result)) {
for (const resource of Object.values(mode)) {
this.push(resource);
}
}
}
Expand Down

0 comments on commit a153426

Please sign in to comment.