File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ function encodeValue(value) {
268268 }
269269
270270 if ( value instanceof Buffer ) {
271- valueProto . blobValue = value . toString ( 'base64' ) ;
271+ valueProto . blobValue = value ;
272272 return valueProto ;
273273 }
274274
@@ -622,11 +622,7 @@ function queryToQueryProto(query) {
622622 } ;
623623
624624 if ( query . endVal ) {
625- if ( is . string ( query . endVal ) ) {
626- queryProto . endCursor = query . endVal ;
627- } else {
628- queryProto . endCursor = query . endVal . toString ( 'base64' ) ;
629- }
625+ queryProto . endCursor = query . endVal ;
630626 }
631627
632628 if ( query . limitVal > 0 ) {
@@ -640,11 +636,7 @@ function queryToQueryProto(query) {
640636 }
641637
642638 if ( query . startVal ) {
643- if ( is . string ( query . startVal ) ) {
644- queryProto . startCursor = query . startVal ;
645- } else {
646- queryProto . startCursor = query . startVal . toString ( 'base64' ) ;
647- }
639+ queryProto . startCursor = query . startVal ;
648640 }
649641
650642 if ( query . filters . length > 0 ) {
Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ describe('entity', function() {
357357 var value = new Buffer ( 'Hi' ) ;
358358
359359 var expectedValueProto = {
360- blobValue : value . toString ( 'base64' )
360+ blobValue : value
361361 } ;
362362
363363 assert . deepEqual ( entity . encodeValue ( value ) , expectedValueProto ) ;
@@ -881,8 +881,8 @@ describe('entity', function() {
881881 . end ( endVal ) ;
882882
883883 var queryProto = entity . queryToQueryProto ( query ) ;
884- assert . strictEqual ( queryProto . endCursor , endVal . toString ( 'base64' ) ) ;
885- assert . strictEqual ( queryProto . startCursor , startVal . toString ( 'base64' ) ) ;
884+ assert . strictEqual ( queryProto . endCursor , endVal ) ;
885+ assert . strictEqual ( queryProto . startCursor , startVal ) ;
886886 } ) ;
887887 } ) ;
888888} ) ;
You can’t perform that action at this time.
0 commit comments