File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -186,19 +186,14 @@ export const checkOptions = ({
186
186
prefixes : Record < string , string > ;
187
187
appsWhiteList : string [ ] | null | undefined ;
188
188
} ) : void => {
189
- if ( ! latitude || ! longitude ) {
189
+ if ( ! ( latitude && longitude ) && ! address ) {
190
190
throw new MapsException (
191
- '`showLocation` should contain keys `latitude` and `longitude` .' ,
191
+ '`latitude` & `longitude` or `address` is required. Both cannot be undefined .' ,
192
192
) ;
193
193
}
194
194
if ( address && typeof address !== 'string' ) {
195
195
throw new MapsException ( 'Option `address` should be of type `string`.' ) ;
196
196
}
197
- if ( ! latitude && ! longitude && ! address ) {
198
- throw new MapsException (
199
- '`latitude` & `longitude` or `address` is required. Both cannot be undefined.' ,
200
- ) ;
201
- }
202
197
if ( title && typeof title !== 'string' ) {
203
198
throw new MapsException ( '`title` should be of type `string`.' ) ;
204
199
}
You can’t perform that action at this time.
0 commit comments