@@ -1066,7 +1066,7 @@ function removeOutputTransform(headers, data) {
10661066
10671067 if ( operation . contentOnly === true ) {
10681068 // for deprecated backward compatibility
1069- return ( operation . uris . length === 1 ) ? operation . uris [ 0 ] : operation . uris ;
1069+ return operation . isLegacy ? operation . uris [ 0 ] : operation . uris ;
10701070 }
10711071
10721072 var wrapper = {
@@ -1108,9 +1108,11 @@ function removeOutputTransform(headers, data) {
11081108 * a {@link documents#removeResult} success callback.
11091109 */
11101110function removeDocument ( ) {
1111- return removeDocumentImpl . call ( this , false , mlutil . asArray . apply ( null , arguments ) ) ;
1111+ return removeDocumentImpl . call (
1112+ this , false , false , mlutil . asArray . apply ( null , arguments )
1113+ ) ;
11121114}
1113- function removeDocumentImpl ( contentOnly , args ) {
1115+ function removeDocumentImpl ( contentOnly , isLegacy , args ) {
11141116 if ( args . length < 1 ) {
11151117 throw new Error ( 'must provide uris for document remove()' ) ;
11161118 }
@@ -1178,6 +1180,7 @@ function removeDocumentImpl(contentOnly, args) {
11781180 operation . outputTransform = removeOutputTransform ;
11791181 operation . errorTransform = uriErrorTransform ;
11801182 operation . contentOnly = ( contentOnly === true ) ;
1183+ operation . isLegacy = isLegacy ;
11811184
11821185 return mlrest . startRequest ( operation ) ;
11831186}
0 commit comments