Skip to content

Commit

Permalink
fix: set default limit if unset
Browse files Browse the repository at this point in the history
  • Loading branch information
hoonoh committed Dec 7, 2020
1 parent ed475c9 commit a4431ae
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/lib/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,18 +265,17 @@ export const getGlobalSpotPrices = async (options?: {
minVCPU,
minMemoryGiB,
platforms,
limit,
reduceAZ,
accessKeyId,
secretAccessKey,
onRegionFetch,
onRegionFetchFail,
onFetchComplete,
} = options || {
limit: defaults.limit,
};
} = options || {};

let { limit, regions, instanceTypes } = options || {};

let { regions, instanceTypes } = options || {};
if (limit === undefined) limit = defaults.limit;

if (regions === undefined || !regions.length) regions = defaultRegions;

Expand Down

0 comments on commit a4431ae

Please sign in to comment.