grapher/lib/exposure/lib/enforceMaxLimit.js
2016-09-24 08:05:26 +03:00

13 lines
No EOL
270 B
JavaScript

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