jsgar 2.0.0 → 2.1.0
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/dist/gar.umd.js +11 -9
- package/package.json +1 -1
package/dist/gar.umd.js
CHANGED
|
@@ -613,6 +613,16 @@
|
|
|
613
613
|
subscriptionGroup = 0,
|
|
614
614
|
snapshotSizeLimit = 0
|
|
615
615
|
) {
|
|
616
|
+
// Convert className to array
|
|
617
|
+
let classList = null;
|
|
618
|
+
if (typeof className === 'string') {
|
|
619
|
+
classList = className.split(/\s+/).filter(Boolean);
|
|
620
|
+
} else if (Array.isArray(className)) {
|
|
621
|
+
classList = className;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
let singleClass = Array.isArray(classList) && classList.length === 1 ? classList[0] : null;
|
|
625
|
+
|
|
616
626
|
// Convert keyName to array
|
|
617
627
|
let keyNames = [];
|
|
618
628
|
if (typeof keyName === 'string') {
|
|
@@ -620,7 +630,7 @@
|
|
|
620
630
|
} else if (Array.isArray(keyName)) {
|
|
621
631
|
keyNames = keyName;
|
|
622
632
|
}
|
|
623
|
-
const keyIdList = keyNames.map(x => this.getAndPossiblyIntroduceKeyId(x));
|
|
633
|
+
const keyIdList = keyNames.map(x => this.getAndPossiblyIntroduceKeyId(x, singleClass));
|
|
624
634
|
|
|
625
635
|
// Convert topicName to array
|
|
626
636
|
let topicNames = [];
|
|
@@ -631,14 +641,6 @@
|
|
|
631
641
|
}
|
|
632
642
|
const topicIdList = topicNames.map(x => this.getAndPossiblyIntroduceTopicId(x));
|
|
633
643
|
|
|
634
|
-
// Convert className to array
|
|
635
|
-
let classList = null;
|
|
636
|
-
if (typeof className === 'string') {
|
|
637
|
-
classList = className.split(/\s+/).filter(Boolean);
|
|
638
|
-
} else if (Array.isArray(className)) {
|
|
639
|
-
classList = className;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
644
|
const subMsg = {
|
|
643
645
|
message_type: 'Subscribe',
|
|
644
646
|
value: {
|