Skip to content

Commit

Permalink
Check config object exists before getting firstChunk
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanseys committed Mar 17, 2015
1 parent 812870d commit a5df4ec
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 a5df4ec

Please sign in to comment.