Skip to content

Commit

Permalink
Check for existence of scroll target in index frame controller
Browse files Browse the repository at this point in the history
  • Loading branch information
spohlenz committed Oct 23, 2023
1 parent 03527af commit 5743ef1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/assets/bundle/trestle/bundle.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion frontend/js/controllers/index_frame_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export default class extends ApplicationController {
}

scrollToTop (e) {
this.scrollTarget.scrollIntoView()
if (this.hasScrollTarget) {
this.scrollTarget.scrollIntoView()
}
}

reload () {
Expand Down

0 comments on commit 5743ef1

Please sign in to comment.