mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 05:36:18 +01:00
TypeScript: Ensure 'FormatEnum' keys match reality #4475
Renames format.jp2k as format.jp2 for consistency
This commit is contained in:
@@ -76,7 +76,7 @@ function toFile (fileOut, callback) {
|
||||
err = new Error('Missing output file path');
|
||||
} else if (is.string(this.options.input.file) && path.resolve(this.options.input.file) === path.resolve(fileOut)) {
|
||||
err = new Error('Cannot use same file for input and output');
|
||||
} else if (jp2Regex.test(path.extname(fileOut)) && !this.constructor.format.jp2k.output.file) {
|
||||
} else if (jp2Regex.test(path.extname(fileOut)) && !this.constructor.format.jp2.output.file) {
|
||||
err = errJp2Save();
|
||||
}
|
||||
if (err) {
|
||||
@@ -950,7 +950,7 @@ function gif (options) {
|
||||
*/
|
||||
function jp2 (options) {
|
||||
/* node:coverage ignore next 41 */
|
||||
if (!this.constructor.format.jp2k.output.buffer) {
|
||||
if (!this.constructor.format.jp2.output.buffer) {
|
||||
throw errJp2Save();
|
||||
}
|
||||
if (is.object(options)) {
|
||||
|
||||
Reference in New Issue
Block a user