Skip to content

Commit

Permalink
Fix issue where event wasn't set in time
Browse files Browse the repository at this point in the history
  • Loading branch information
Mosnar committed Aug 20, 2019
1 parent 9d09ed7 commit af64c3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/ImageRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const sharp = require('sharp')

class ImageRequest {
constructor (event) {
this.event = event
// If the hash isn't set when it should be, we'll throw an error.
if (process.env.SECURITY_KEY !== undefined && process.env.SECURITY_KEY !== null && process.env.SECURITY_KEY.length) {
this.checkHash()
Expand All @@ -13,7 +14,6 @@ class ImageRequest {
const { bucket, prefix } = eventParser.processSourceBucket(process.env.SOURCE_BUCKET)
this.bucket = bucket
this.key = eventParser.parseImageKey(event['path'], prefix)
this.event = event
}

/**
Expand Down

0 comments on commit af64c3b

Please sign in to comment.