Skip to content

Commit

Permalink
Fix: Show next/previous buttons for file collections in error viewer (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jstoffan authored Apr 18, 2019
1 parent fa6e82a commit ce3e834
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/Preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,9 @@ class Preview extends EventEmitter {
// Destroy anything still showing
this.destroy();

// Setup the preview ui for next/previous buttons
this.setupUI();

// Instantiate the error viewer
this.viewer = this.getErrorViewer();

Expand Down
2 changes: 2 additions & 0 deletions src/lib/__tests__/Preview-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2180,6 +2180,7 @@ describe('lib/Preview', () => {
stubs.emit = sandbox.stub(preview, 'emit');
stubs.emitPreviewError = sandbox.stub(preview, 'emitPreviewError');
stubs.attachViewerListeners = sandbox.stub(preview, 'attachViewerListeners');
stubs.setupUI = sandbox.stub(preview, 'setupUI');

preview.open = true;
});
Expand All @@ -2205,6 +2206,7 @@ describe('lib/Preview', () => {
expect(preview.open).to.be.false;
expect(stubs.uncacheFile).to.be.called;
expect(stubs.destroy).to.be.called;
expect(stubs.setupUI).to.be.called;
});

it('should get the error viewer, attach viewer listeners, and load the error viewer', () => {
Expand Down

0 comments on commit ce3e834

Please sign in to comment.