@stoplight/elements-core 9.0.7 → 9.0.8

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.
package/index.esm.js CHANGED
@@ -2948,6 +2948,9 @@ const Response = ({ response, onMediaTypeChange }) => {
2948
2948
  };
2949
2949
  Response.displayName = 'HttpOperation.Response';
2950
2950
  const codeToIntentVal = (code) => {
2951
+ if (typeof code !== 'string' || code.trim() === '') {
2952
+ return 'default';
2953
+ }
2951
2954
  const firstChar = code.charAt(0);
2952
2955
  switch (firstChar) {
2953
2956
  case '2':
package/index.js CHANGED
@@ -2970,6 +2970,9 @@ const Response = ({ response, onMediaTypeChange }) => {
2970
2970
  };
2971
2971
  Response.displayName = 'HttpOperation.Response';
2972
2972
  const codeToIntentVal = (code) => {
2973
+ if (typeof code !== 'string' || code.trim() === '') {
2974
+ return 'default';
2975
+ }
2973
2976
  const firstChar = code.charAt(0);
2974
2977
  switch (firstChar) {
2975
2978
  case '2':
package/index.mjs CHANGED
@@ -2948,6 +2948,9 @@ const Response = ({ response, onMediaTypeChange }) => {
2948
2948
  };
2949
2949
  Response.displayName = 'HttpOperation.Response';
2950
2950
  const codeToIntentVal = (code) => {
2951
+ if (typeof code !== 'string' || code.trim() === '') {
2952
+ return 'default';
2953
+ }
2951
2954
  const firstChar = code.charAt(0);
2952
2955
  switch (firstChar) {
2953
2956
  case '2':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements-core",
3
- "version": "9.0.7",
3
+ "version": "9.0.8",
4
4
  "main": "./index.js",
5
5
  "sideEffects": [
6
6
  "web-components.min.js",