@@ -234,7 +234,7 @@ Bucket.prototype.get = function( id, callback ) {
234234 *
235235 * @param {String } id - the bucket id for the object to update
236236 * @param {Object } data - object literal to replace the object data with
237- * @param {Object } updateInfo - object containing data about a remote change
237+ * @param {Object } remoteUpdateInfo - object containing data about a remote change
238238 * @param {Object } [updateInfo.original] - the original object before the udpate
239239 * @param {Object } [updateInfo.patch] - the JSONDiff patch to apply to the object
240240 * @param {Boolean } [updateInfo.isIndexing] - true if the bucket is currently indexing
@@ -243,10 +243,10 @@ Bucket.prototype.get = function( id, callback ) {
243243 * @param {?bucketStoreGetCallback } callback - executed when object is updated localy
244244 * @returns {Promise<Object> } - update data
245245 */
246- Bucket . prototype . update = function ( id , data , updateInfo , options , callback ) {
246+ Bucket . prototype . update = function ( id , data , remoteUpdateInfo , options , callback ) {
247247 // Callback could be 3rd or 4th argument
248- if ( typeof updateInfo === 'function' ) {
249- callback = updateInfo ;
248+ if ( typeof remoteUpdateInfo === 'function' ) {
249+ callback = remoteUpdateInfo ;
250250 options = { sync : true } ;
251251 } else if ( typeof options === 'function' ) {
252252 callback = options ;
@@ -259,7 +259,7 @@ Bucket.prototype.update = function( id, data, updateInfo, options, callback ) {
259259
260260 const task = this . storeAPI . update ( id , data , this . isIndexing )
261261 . then ( bucketObject => {
262- this . emit ( 'update' , id , bucketObject . data , updateInfo ) ;
262+ this . emit ( 'update' , id , bucketObject . data , remoteUpdateInfo ) ;
263263 this . channel . update ( bucketObject , options . sync ) ;
264264 return bucketObject ;
265265 } ) ;
0 commit comments