Skip to content

Commit

Permalink
Fix: Properly bind download button in PreviewErrorViewer (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Press authored Dec 1, 2017
1 parent fc71416 commit 122e0c9
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/lib/viewers/error/PreviewErrorViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ import './PreviewError.scss';

class PreviewErrorViewer extends BaseViewer {
/**
* [constructor]
*
* @param {string|HTMLElement} container - The container
* @param {Object} options - Some options
* @return {Error} Error instance
* @inheritdoc
*/
constructor(options) {
super(options);

// Bind context for handler
this.download = this.download.bind(this);
}

/**
* @inheritdoc
*/
setup() {
// Call super() first to set up common layout
Expand Down

0 comments on commit 122e0c9

Please sign in to comment.