Skip to content

Commit 3c42efb

Browse files
committed
rename isBadlySet -> isImpliedOrValid
1 parent 7565d0b commit 3c42efb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/plot_api/to_image.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ function toImage(gd, opts) {
9090
config = gd._context;
9191
}
9292

93-
function isBadlySet(attr) {
93+
function isImpliedOrValid(attr) {
9494
return !(attr in opts) || Lib.validate(opts[attr], attrs[attr]);
9595
}
9696

97-
if(!isBadlySet('width') || !isBadlySet('height')) {
97+
if(!isImpliedOrValid('width') || !isImpliedOrValid('height')) {
9898
throw new Error('Height and width should be pixel values.');
9999
}
100100

101-
if(!isBadlySet('format')) {
101+
if(!isImpliedOrValid('format')) {
102102
throw new Error('Image format is not jpeg, png, svg or webp.');
103103
}
104104

0 commit comments

Comments
 (0)