decodeFeedbackId.tsx 343 B

123456789
  1. import {decodeScalar} from 'sentry/utils/queryString';
  2. export default function decodeFeedbackId(val: string | string[] | null | undefined) {
  3. const [, feedbackId] = decodeScalar(val, '').split(':');
  4. // TypeScript thinks `feedbackId` is a string, but it could be undefined.
  5. // See `noUncheckedIndexedAccess`
  6. return feedbackId ?? '';
  7. }