From a13281a43b829115e26599ced0b8c02e037029a9 Mon Sep 17 00:00:00 2001 From: Yury Date: Sun, 22 Aug 2021 17:12:39 +0300 Subject: [PATCH] fix: Correct the order of data type check --- src/PropertyDocumentMixin.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/PropertyDocumentMixin.js b/src/PropertyDocumentMixin.js index 71b6940..5a6667a 100644 --- a/src/PropertyDocumentMixin.js +++ b/src/PropertyDocumentMixin.js @@ -124,6 +124,9 @@ const mxFunction = (base) => { if (this._hasType(range, rs.UnionShape)) { return 'Union'; } + if (this._hasType(range, rs.TupleShape)) { + return 'Tuple'; + } if (this._hasType(range, rs.ArrayShape)) { return 'Array'; } @@ -136,21 +139,15 @@ const mxFunction = (base) => { if (this._hasType(range, rs.NilShape)) { return 'Null'; } - if (this._hasType(range, rs.AnyShape)) { - return 'Any'; - } if (this._hasType(range, rs.MatrixShape)) { return 'Matrix'; } - if (this._hasType(range, rs.TupleShape)) { - return 'Tuple'; - } - if (this._hasType(range, rs.UnionShape)) { - return 'Union'; - } if (this._hasType(range, rs.RecursiveShape)) { return 'Recursive'; } + if (this._hasType(range, rs.AnyShape)) { + return 'Any'; + } return 'Unknown type'; }