Error: undefined is not an object (evaluating 'viewHistory.currentView.index')

I posted issue at Github.

Anyone encounter this error?
Is this ionic bug or my code bug?

We also saw this problem. The issue was that we were trying to populate the history variable when it was null.

we changed from

$ionicHistory.viewHistory().backView = data.backView;
$ionicHistory.viewHistory().histories = data.historyView;

TO

if(data.backView && data.backView != null && data.backView != ''){
    $ionicHistory.viewHistory().backView = data.backView;
    $ionicHistory.viewHistory().histories = data.historyView;
 }