Skip to content

Commit 065b03d

Browse files
committed
Fix setting type with invalid names
1 parent e751963 commit 065b03d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Scripts/ScriptUI Panels/inc/api/layer.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,8 +551,10 @@ Duik.Layer.sanitizeName = function(layer) {
551551
// In this case, check the second part
552552
if (typeStr != "") {
553553
match = g2.match(Duik.Layer.NameRegExp.SIMPLE);
554-
g1 = DuString.trim( match[1] );
555-
g2 = DuString.trim( match[2] );
554+
if (match) {
555+
g1 = DuString.trim( match[1] );
556+
g2 = DuString.trim( match[2] );
557+
}
556558
}
557559

558560
if (g2 == "") nameStr = g1;

0 commit comments

Comments
 (0)