@globalfishingwatch/react-map-gl
Version:
A React wrapper for MapboxGL-js and overlay API.
10 lines (9 loc) • 339 B
JavaScript
// @flow
// Replacement for the external assert method to reduce bundle size
// Note: We don't use the second "message" argument in calling code,
// so no need to support it here
export default function assert(condition: any, message?: string) {
if (!condition) {
throw new Error(message || 'react-map-gl: assertion failed.');
}
}