Skip to content

Commit 6a56636

Browse files
committed
fixed issu#154
1 parent f7922cf commit 6a56636

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/ng-multiselect-dropdown/src/multiselect.component.ts

+2-10
Original file line numberDiff line numberDiff line change
@@ -255,19 +255,11 @@ export class MultiSelectComponent implements ControlValueAccessor {
255255
const selected = [];
256256
if (Array.isArray(val)) {
257257
val.map(item => {
258-
if (item.id === item.text) {
259-
selected.push(item.text);
260-
} else {
261-
selected.push(this.objectify(item));
262-
}
258+
selected.push(this.objectify(item));
263259
});
264260
} else {
265261
if (val) {
266-
if (val.id === val.text) {
267-
return val.text;
268-
} else {
269-
return this.objectify(val);
270-
}
262+
return this.objectify(val);
271263
}
272264
}
273265
return selected;

0 commit comments

Comments
 (0)