File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,6 @@ Encoder.prototype.encode = function(obj, callback){
145
145
146
146
function encodeAsString ( obj ) {
147
147
var str = '' ;
148
- var nsp = false ;
149
148
150
149
// first is type
151
150
str += obj . type ;
@@ -159,22 +158,17 @@ function encodeAsString(obj) {
159
158
// if we have a namespace other than `/`
160
159
// we append it followed by a comma `,`
161
160
if ( obj . nsp && '/' !== obj . nsp ) {
162
- nsp = true ;
163
161
str += obj . nsp ;
162
+ str += ',' ;
164
163
}
165
164
166
165
// immediately followed by the id
167
166
if ( null != obj . id ) {
168
- if ( nsp ) {
169
- str += ',' ;
170
- nsp = false ;
171
- }
172
167
str += obj . id ;
173
168
}
174
169
175
170
// json data
176
171
if ( null != obj . data ) {
177
- if ( nsp ) str += ',' ;
178
172
str += json . stringify ( obj . data ) ;
179
173
}
180
174
You can’t perform that action at this time.
0 commit comments