Skip to content

Commit

Permalink
fix: eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
slaveeks committed Jul 4, 2024
1 parent c7303e1 commit fa0d4c9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class Downloader {
*/
constructor({ config, onDownload, onError }) {
this.config = config;
this.onDownload = onDownload
this.onDownload = onDownload;
this.onError = onError;
}

Expand Down
13 changes: 7 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ import { IconAddBorder, IconStretch, IconAddBackground, IconPicture } from '@cod
* @property {object} additionalRequestHeaders - allows to pass custom headers with Request
* @property {string} buttonContent - overrides for Select File button
* @property {object} [uploader] - optional custom uploader
* @property {object} [downloader] - optional custom downloader
* @property {function(File): Promise.<UploadResponseFormat>} [uploader.uploadByFile] - method that upload image by File
* @property {function(string): Promise.<UploadResponseFormat>} [uploader.uploadByUrl] - method that upload image by URL
* @property {object} [downloader] - optional custom downloader
* @property {function(string): Promise.<string>} [downloader.download] - method that download image by data key
*/

/**
Expand Down Expand Up @@ -155,7 +156,7 @@ export default class ImageTool {
buttonContent: config.buttonContent || '',
uploader: config.uploader || undefined,
actions: config.actions || [],
downloader: config.downloader || undefined
downloader: config.downloader || undefined,
};

/**
Expand Down Expand Up @@ -190,7 +191,7 @@ export default class ImageTool {
config: this.config,
onDownload: (url) => this.onDownload(url),
onError: this.downloadingFileError,
})
});

/**
* Set saved state
Expand Down Expand Up @@ -396,7 +397,7 @@ export default class ImageTool {
this._data.file = file || {};

if (file && file.url) {
this.downloader.download(file.url)
this.downloader.download(file.url);
}
}

Expand Down Expand Up @@ -451,11 +452,11 @@ export default class ImageTool {

/**
* File downloading callback, fills file data into image
*
*
* @param {*} url - file url after downloading
*/
onDownload(url) {
this.ui.fillImage(url)
this.ui.fillImage(url);
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,3 @@ export default class Ui {
this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${tuneName}`, status);
}
}

1 change: 0 additions & 1 deletion src/uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,3 @@ export default class Uploader {
});
}
}

0 comments on commit fa0d4c9

Please sign in to comment.