Skip to content

Commit

Permalink
Merge pull request #447 from ryanseys/check-config-obj
Browse files Browse the repository at this point in the history
Check config object exists before getting firstChunk
  • Loading branch information
stephenplusplus committed Mar 23, 2015
2 parents f1a3844 + a5df4ec commit 5809f5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/storage/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ File.prototype.startResumableUpload_ = function(stream, metadata) {
// by caching a slice of the first chunk, then comparing it with the first
// byte of incoming data.
if (bytesWritten === 0) {
var cachedFirstChunk = configStore.get(that.name).firstChunk;
var cachedFirstChunk = config && config.firstChunk;
var firstChunk = chunk.slice(0, 16);

if (!cachedFirstChunk) {
Expand Down

0 comments on commit 5809f5e

Please sign in to comment.