grapher/lib/exposure/lib/enforceMaxLimit.js

13 lines
270 B
JavaScript
Raw Normal View History

export default function (options, maxLimit) {
if (maxLimit === undefined) {
return;
}
if (options.limit) {
if (options.limit > maxLimit) {
options.limit = maxLimit;
}
} else {
options.limit = maxLimit;
}
}