From a5df4ec92d48e971c2b61ff5968207874caa16b0 Mon Sep 17 00:00:00 2001 From: Ryan Seys Date: Mon, 16 Mar 2015 20:07:26 -0400 Subject: [PATCH] Check config object exists before getting firstChunk --- lib/storage/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/storage/file.js b/lib/storage/file.js index 18cdbf3b61f..bb6e3245491 100644 --- a/lib/storage/file.js +++ b/lib/storage/file.js @@ -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) {