Skip to content

Commit a13281a

Browse files
committed
fix: Correct the order of data type check
1 parent 227e582 commit a13281a

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/PropertyDocumentMixin.js

+6-9
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ const mxFunction = (base) => {
124124
if (this._hasType(range, rs.UnionShape)) {
125125
return 'Union';
126126
}
127+
if (this._hasType(range, rs.TupleShape)) {
128+
return 'Tuple';
129+
}
127130
if (this._hasType(range, rs.ArrayShape)) {
128131
return 'Array';
129132
}
@@ -136,21 +139,15 @@ const mxFunction = (base) => {
136139
if (this._hasType(range, rs.NilShape)) {
137140
return 'Null';
138141
}
139-
if (this._hasType(range, rs.AnyShape)) {
140-
return 'Any';
141-
}
142142
if (this._hasType(range, rs.MatrixShape)) {
143143
return 'Matrix';
144144
}
145-
if (this._hasType(range, rs.TupleShape)) {
146-
return 'Tuple';
147-
}
148-
if (this._hasType(range, rs.UnionShape)) {
149-
return 'Union';
150-
}
151145
if (this._hasType(range, rs.RecursiveShape)) {
152146
return 'Recursive';
153147
}
148+
if (this._hasType(range, rs.AnyShape)) {
149+
return 'Any';
150+
}
154151
return 'Unknown type';
155152
}
156153

0 commit comments

Comments
 (0)