Skip to content

Commit

Permalink
fixed ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
inlife committed Oct 11, 2024
1 parent 4fa2eb2 commit d45865b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/nexrender-action-image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ module.exports = async (job, settings, { create, input, output, filters }) => {
throw new Error('No output provided');
}

/* fill absolute/relative paths */
if (input && !path.isAbsolute(input)) input = path.join(job.workpath, input);
if (output && !path.isAbsolute(output)) output = path.join(job.workpath, output);

if (!input && create) {
const [width, height] = create;
image = new jimp(width, height);
} else {
image = await jimp.read(input);
}

/* fill absolute/relative paths */
if (input && !path.isAbsolute(input)) input = path.join(job.workpath, input);
if (output && !path.isAbsolute(output)) output = path.join(job.workpath, output);

for (const filter of filters) {
const { name, args } = filter;

Expand Down

0 comments on commit d45865b

Please sign in to comment.