@integry/sdk 4.7.29 → 4.7.30
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/package.json
CHANGED
|
@@ -636,7 +636,10 @@ const MultipurposeField = (props: MultipurposeFieldProps) => {
|
|
|
636
636
|
const vallueToUse = Array.isArray(currentValue)
|
|
637
637
|
? currentValue[0]
|
|
638
638
|
: currentValue;
|
|
639
|
-
const isTag =
|
|
639
|
+
const isTag =
|
|
640
|
+
typeof vallueToUse === 'string'
|
|
641
|
+
? vallueToUse?.startsWith('{') && vallueToUse?.endsWith('}')
|
|
642
|
+
: false;
|
|
640
643
|
if (isEditable && !allowTagsInText && isMappable && isTag) {
|
|
641
644
|
setTempPlaceholder(vallueToUse || '');
|
|
642
645
|
}
|
|
@@ -651,7 +654,7 @@ const MultipurposeField = (props: MultipurposeFieldProps) => {
|
|
|
651
654
|
const getStringFromEnd = (str: string): string => {
|
|
652
655
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
653
656
|
const regex = /\{([^{}]+)$/;
|
|
654
|
-
const matches = (str || '').match(regex);
|
|
657
|
+
const matches = typeof str === 'string' ? (str || '').match(regex) : [];
|
|
655
658
|
|
|
656
659
|
if (matches && matches.length > 1) {
|
|
657
660
|
const capturedString = matches[0];
|