@igo2/context 20.1.0-next.26 → 20.1.0-next.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -393,10 +393,10 @@ function hasLegacyParams(params, optionsLegacy) {
393
393
  return legacyPairs.some(([layer, url]) => getParamValue(params, layer) && getParamValue(params, url));
394
394
  }
395
395
  function hasModernShareParams(params, keysDefinitions) {
396
- const { layers, groups } = keysDefinitions;
396
+ const { contextKey, groups } = keysDefinitions;
397
397
  const hasGroups = !!getParamValue(params, groups.key);
398
- const hasLayers = !!getParamValue(params, layers.key);
399
- return hasLayers || hasGroups;
398
+ const hasContext = !!getParamValue(params, contextKey);
399
+ return hasContext || hasGroups;
400
400
  }
401
401
  function getParamValue(params, key) {
402
402
  const value = params[key];
@@ -2361,9 +2361,7 @@ class LayerContextDirective {
2361
2361
  return visible;
2362
2362
  }
2363
2363
  handleContextWithSharedUrl(context) {
2364
- if (!this.queryParams ||
2365
- (!hasLegacyParams(this.queryParams, this.shareMapService.optionsLegacy) &&
2366
- !hasModernShareParams(this.queryParams, this.shareMapService.keysDefinitions))) {
2364
+ if (!this.queryParams) {
2367
2365
  return context.layers;
2368
2366
  }
2369
2367
  const { layers, uri } = context;