Skip to content

Fix for ... in loop to follow javascript best practices #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions imagemagick.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function parseIdentify(input) {

lines.shift(); //drop first line (Image: name.jpg)

for (i in lines) {
for (i in lines) if(lines.hasOwnProperty(i)) {
currentLine = lines[i];
indent = currentLine.search(/\S/);
if (indent >= 0) {
Expand Down Expand Up @@ -356,7 +356,7 @@ exports.resizeArgs = function(options) {
// check options
if (typeof options !== 'object')
throw new Error('first argument must be an object');
for (var k in opt) if (k in options) opt[k] = options[k];
for (var k in opt) if (k in options && opt.hasOwnProperty(k)) opt[k] = options[k];
if (!opt.srcPath && !opt.srcData)
throw new Error('both srcPath and srcData are empty');

Expand Down