orizens / ngx-typeahead

A simple but yet powerful typeahead component for Angular (css framework agnostic)
https://www.npmjs.com/package/ngx-typeahead
MIT License
61 stars 29 forks source link

ERROR TypeError: Cannot read property '1' of null (ngx-typeahead.js:158) #38

Open thebpmgroup opened 5 years ago

thebpmgroup commented 5 years ago

Calling a custom JSONP Rest API written in PHP.

This is a typical response :

{"body":[{"taxonomy_id":"1","taxonomy":"test taxonomy updated","parent_taxonomy_id":null,"created":"2019-07-30 15:14:05","updated":"0000-00-00 00:00:00","active":"1"}],"count":1}

This is how I have configured the component, as per the example :+1: <input [value]="search" ngxTypeahead [taUrl]="url" [taParams]="params" (taSelected)="handleResultSelected($event)"

This is the ts :

public search = ''; public url = 'http://localhost:80/api/controllers/taxonomy.php'; public params = { };

handleResultSelected(result) {
  this.search = result;
}

This is the pages of unhandled errors I get :

ERROR TypeError: Cannot read property '1' of null at MapSubscriber.toJsonpSingleResult [as project] (ngx-typeahead.js:158) at MapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next (map.js:35) at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53) at MapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next (map.js:41) at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53) at FilterSubscriber.push../node_modules/rxjs/_esm5/internal/operators/filter.js.FilterSubscriber._next (filter.js:38) at FilterSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53) at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber.notifyNext (mergeMap.js:84) at InnerSubscriber.push../node_modules/rxjs/_esm5/internal/InnerSubscriber.js.InnerSubscriber._next (InnerSubscriber.js:15) at InnerSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53) defaultErrorLogger @ core.js:5847 push../node_modules/@angular/core/fesm5/core.js.ErrorHandler.handleError @ core.js:5895 next @ core.js:24847 schedulerFn @ core.js:22101 push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub @ Subscriber.js:192 push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next @ Subscriber.js:130 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next @ Subscriber.js:76 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/Subject.js.Subject.next @ Subject.js:47 push../node_modules/@angular/core/fesm5/core.js.EventEmitter.emit @ core.js:22085 (anonymous) @ core.js:24371 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391 push../node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:150 push../node_modules/@angular/core/fesm5/core.js.NgZone.runOutsideAngular @ core.js:24308 onHandleError @ core.js:24371 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.handleError @ zone.js:395 push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:198 push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:498 ZoneTask.invoke @ zone.js:487 timer @ zone.js:3070 setTimeout (async) scheduleTask @ zone.js:3091 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:410 onScheduleTask @ zone.js:301 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:404 push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:238 push../node_modules/zone.js/dist/zone.js.Zone.scheduleMacroTask @ zone.js:261 scheduleMacroTaskWithCurrentZone @ zone.js:1194 (anonymous) @ zone.js:3106 proto. @ zone.js:1518 hostReportError @ hostReportError.js:3 push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.error @ Subscriber.js:164 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error @ Subscriber.js:79 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error @ Subscriber.js:59 push../node_modules/rxjs/_esm5/internal/OuterSubscriber.js.OuterSubscriber.notifyError @ OuterSubscriber.js:13 push../node_modules/rxjs/_esm5/internal/InnerSubscriber.js.InnerSubscriber._error @ InnerSubscriber.js:18 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error @ Subscriber.js:59 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error @ Subscriber.js:79 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error @ Subscriber.js:59 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next @ map.js:38 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next @ map.js:41 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/filter.js.FilterSubscriber._next @ filter.js:38 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber.notifyNext @ mergeMap.js:84 push../node_modules/rxjs/_esm5/internal/InnerSubscriber.js.InnerSubscriber._next @ InnerSubscriber.js:15 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 onLoad @ http.js:1380 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:423 onInvokeTask @ core.js:24340 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:422 push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:195 push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:498 invokeTask @ zone.js:1693 globalZoneAwareCallback @ zone.js:1719 load (async) customScheduleGlobal @ zone.js:1832 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:410 onScheduleTask @ zone.js:301 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:404 push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:238 push../node_modules/zone.js/dist/zone.js.Zone.scheduleEventTask @ zone.js:264 (anonymous) @ zone.js:2003 (anonymous) @ http.js:1406 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe @ Observable.js:43 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:29 subscribeToResult @ subscribeToResult.js:13 push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._innerSub @ mergeMap.js:74 push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._tryNext @ mergeMap.js:68 push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._next @ mergeMap.js:51 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 (anonymous) @ subscribeToArray.js:5 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe @ Observable.js:43 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:29 push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapOperator.call @ mergeMap.js:29 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24 push../node_modules/rxjs/_esm5/internal/operators/filter.js.FilterOperator.call @ filter.js:15 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapOperator.call @ map.js:18 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapOperator.call @ map.js:18 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapOperator.call @ map.js:18 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24 subscribeToResult @ subscribeToResult.js:13 push../node_modules/rxjs/_esm5/internal/operators/switchMap.js.SwitchMapSubscriber._innerSub @ switchMap.js:51 push../node_modules/rxjs/_esm5/internal/operators/switchMap.js.SwitchMapSubscriber._next @ switchMap.js:41 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/tap.js.TapSubscriber._next @ tap.js:51 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/filter.js.FilterSubscriber._next @ filter.js:38 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js.DistinctUntilChangedSubscriber._next @ distinctUntilChanged.js:55 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber.notifyNext @ mergeMap.js:84 push../node_modules/rxjs/_esm5/internal/InnerSubscriber.js.InnerSubscriber._next @ InnerSubscriber.js:15 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/debounceTime.js.DebounceTimeSubscriber.debouncedNext @ debounceTime.js:48 dispatchNext @ debounceTime.js:62 push../node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js.AsyncAction._execute @ AsyncAction.js:64 push../node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js.AsyncAction.execute @ AsyncAction.js:52 push../node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js.AsyncScheduler.flush @ AsyncScheduler.js:43 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:423 onInvokeTask @ core.js:24340 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:422 push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:195 push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:498 ZoneTask.invoke @ zone.js:487 timer @ zone.js:3070 setInterval (async) scheduleTask @ zone.js:3091 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:410 onScheduleTask @ zone.js:301 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:404 push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:238 push../node_modules/zone.js/dist/zone.js.Zone.scheduleMacroTask @ zone.js:261 scheduleMacroTaskWithCurrentZone @ zone.js:1194 (anonymous) @ zone.js:3106 proto. @ zone.js:1518 push../node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js.AsyncAction.requestAsyncId @ AsyncAction.js:35 push../node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js.AsyncAction.schedule @ AsyncAction.js:28 push../node_modules/rxjs/_esm5/internal/Scheduler.js.Scheduler.schedule @ Scheduler.js:13 push../node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js.AsyncScheduler.schedule @ AsyncScheduler.js:31 push../node_modules/rxjs/_esm5/internal/operators/debounceTime.js.DebounceTimeSubscriber._next @ debounceTime.js:36 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next @ map.js:41 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/filter.js.FilterSubscriber._next @ filter.js:38 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/Subject.js.Subject.next @ Subject.js:47 push../node_modules/ngx-typeahead/esm5/ngx-typeahead.js.NgxTypeAheadComponent.onkeyup @ ngx-typeahead.js:259 (anonymous) @ AssetsComponent.html:65 handleEvent @ core.js:27341 callWithDebugContext @ core.js:28411 debugHandleEvent @ core.js:28138 dispatchEvent @ core.js:18085 (anonymous) @ core.js:26550 (anonymous) @ platform-browser.js:1009 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:423 onInvokeTask @ core.js:24340 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:422 push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:195 push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:498 invokeTask @ zone.js:1693 globalZoneAwareCallback @ zone.js:1719 Show 113 more frames

thebpmgroup commented 5 years ago

I tried flattening out the json a bit to give :

{"taxonomy_id":"1","taxonomy":"test taxonomy updated","parent_taxonomy_id":null,"created":"2019-07-30 15:14:05","updated":"0000-00-00 00:00:00","active":"1"}

Now I get this error :

ERROR TypeError: Cannot read property 'map' of undefined at MapSubscriber.toJsonpFinalResults [as project] (ngx-typeahead.js:165) at MapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next (map.js:35) at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53) at MapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next (map.js:41) at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53) at MapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next (map.js:41) at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53) at FilterSubscriber.push../node_modules/rxjs/_esm5/internal/operators/filter.js.FilterSubscriber._next (filter.js:38) at FilterSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53) at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber.notifyNext (mergeMap.js:84) defaultErrorLogger @ core.js:5847 push../node_modules/@angular/core/fesm5/core.js.ErrorHandler.handleError @ core.js:5895 next @ core.js:24847 schedulerFn @ core.js:22101 push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub @ Subscriber.js:192 push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next @ Subscriber.js:130 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next @ Subscriber.js:76 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/Subject.js.Subject.next @ Subject.js:47 push../node_modules/@angular/core/fesm5/core.js.EventEmitter.emit @ core.js:22085 (anonymous) @ core.js:24371 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391 push../node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:150 push../node_modules/@angular/core/fesm5/core.js.NgZone.runOutsideAngular @ core.js:24308 onHandleError @ core.js:24371 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.handleError @ zone.js:395 push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:198 push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:498 ZoneTask.invoke @ zone.js:487 timer @ zone.js:3070 setTimeout (async) scheduleTask @ zone.js:3091 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:410 onScheduleTask @ zone.js:301 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:404 push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:238 push../node_modules/zone.js/dist/zone.js.Zone.scheduleMacroTask @ zone.js:261 scheduleMacroTaskWithCurrentZone @ zone.js:1194 (anonymous) @ zone.js:3106 proto. @ zone.js:1518 hostReportError @ hostReportError.js:3 push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.error @ Subscriber.js:164 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error @ Subscriber.js:79 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error @ Subscriber.js:59 push../node_modules/rxjs/_esm5/internal/OuterSubscriber.js.OuterSubscriber.notifyError @ OuterSubscriber.js:13 push../node_modules/rxjs/_esm5/internal/InnerSubscriber.js.InnerSubscriber._error @ InnerSubscriber.js:18 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error @ Subscriber.js:59 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next @ map.js:38 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next @ map.js:41 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next @ map.js:41 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/filter.js.FilterSubscriber._next @ filter.js:38 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber.notifyNext @ mergeMap.js:84 push../node_modules/rxjs/_esm5/internal/InnerSubscriber.js.InnerSubscriber._next @ InnerSubscriber.js:15 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 onLoad @ http.js:1380 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:423 onInvokeTask @ core.js:24340 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:422 push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:195 push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:498 invokeTask @ zone.js:1693 globalZoneAwareCallback @ zone.js:1719 load (async) customScheduleGlobal @ zone.js:1832 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:410 onScheduleTask @ zone.js:301 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:404 push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:238 push../node_modules/zone.js/dist/zone.js.Zone.scheduleEventTask @ zone.js:264 (anonymous) @ zone.js:2003 (anonymous) @ http.js:1406 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe @ Observable.js:43 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:29 subscribeToResult @ subscribeToResult.js:13 push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._innerSub @ mergeMap.js:74 push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._tryNext @ mergeMap.js:68 push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._next @ mergeMap.js:51 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 (anonymous) @ subscribeToArray.js:5 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe @ Observable.js:43 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:29 push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapOperator.call @ mergeMap.js:29 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24 push../node_modules/rxjs/_esm5/internal/operators/filter.js.FilterOperator.call @ filter.js:15 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapOperator.call @ map.js:18 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapOperator.call @ map.js:18 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapOperator.call @ map.js:18 push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24 subscribeToResult @ subscribeToResult.js:13 push../node_modules/rxjs/_esm5/internal/operators/switchMap.js.SwitchMapSubscriber._innerSub @ switchMap.js:51 push../node_modules/rxjs/_esm5/internal/operators/switchMap.js.SwitchMapSubscriber._next @ switchMap.js:41 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/tap.js.TapSubscriber._next @ tap.js:51 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/filter.js.FilterSubscriber._next @ filter.js:38 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js.DistinctUntilChangedSubscriber._next @ distinctUntilChanged.js:55 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber.notifyNext @ mergeMap.js:84 push../node_modules/rxjs/_esm5/internal/InnerSubscriber.js.InnerSubscriber._next @ InnerSubscriber.js:15 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/debounceTime.js.DebounceTimeSubscriber.debouncedNext @ debounceTime.js:48 dispatchNext @ debounceTime.js:62 push../node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js.AsyncAction._execute @ AsyncAction.js:64 push../node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js.AsyncAction.execute @ AsyncAction.js:52 push../node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js.AsyncScheduler.flush @ AsyncScheduler.js:43 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:423 onInvokeTask @ core.js:24340 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:422 push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:195 push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:498 ZoneTask.invoke @ zone.js:487 timer @ zone.js:3070 setInterval (async) scheduleTask @ zone.js:3091 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:410 onScheduleTask @ zone.js:301 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:404 push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:238 push../node_modules/zone.js/dist/zone.js.Zone.scheduleMacroTask @ zone.js:261 scheduleMacroTaskWithCurrentZone @ zone.js:1194 (anonymous) @ zone.js:3106 proto. @ zone.js:1518 push../node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js.AsyncAction.requestAsyncId @ AsyncAction.js:35 push../node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js.AsyncAction.schedule @ AsyncAction.js:28 push../node_modules/rxjs/_esm5/internal/Scheduler.js.Scheduler.schedule @ Scheduler.js:13 push../node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js.AsyncScheduler.schedule @ AsyncScheduler.js:31 push../node_modules/rxjs/_esm5/internal/operators/debounceTime.js.DebounceTimeSubscriber._next @ debounceTime.js:36 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next @ map.js:41 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/operators/filter.js.FilterSubscriber._next @ filter.js:38 push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:53 push../node_modules/rxjs/_esm5/internal/Subject.js.Subject.next @ Subject.js:47 push../node_modules/ngx-typeahead/esm5/ngx-typeahead.js.NgxTypeAheadComponent.onkeyup @ ngx-typeahead.js:259 (anonymous) @ AssetsComponent.html:65 handleEvent @ core.js:27341 callWithDebugContext @ core.js:28411 debugHandleEvent @ core.js:28138 dispatchEvent @ core.js:18085 (anonymous) @ core.js:26550 (anonymous) @ platform-browser.js:1009 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:423 onInvokeTask @ core.js:24340 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:422 push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:195 push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:498 invokeTask @ zone.js:1693 globalZoneAwareCallback @ zone.js:1719 Show 113 more frames

Why does this think my valid json response is "undefined"?