The files route has three possible views:
- Shows all the files.
- Shows an overlay that shows matching files that were detected.
- Show an individual file using a query parameter.
Current issue is that when the third scenario occurs - accessing a specific file using query params like url/files?fileId=6
- and you got to another route and come back to files, the files route is now url/files?fileId=6
instead of /files
.
Hunch is that this should be address using deactivate() or resetController() but haven't had much luck. Any help is appreciated!
redirect(){
const deal = this.get('session.deal');
if (!this.get('session.isViewer') &&
this.get('session.matchedFiles.length') > 0){
if(!this.get('router.url').includes('?fileId=')) {
if(deal.get('creationStatus') === 'ready') {
this.transitionTo('files.matches');
}
}
} else {
if (!this.get('session.isViewer') &&
this.get('session.matchedFiles.length') === 0) {
if(deal.get('creationStatus') === 'ready') {
this.transitionTo('files');
}
}
}
},
Aucun commentaire:
Enregistrer un commentaire