Skip to content

Commit 9c12934

Browse files
committed
better fix to combinators
1 parent f3f92be commit 9c12934

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

dist/v-2-11-1/activecss-2-11-1.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/v-2-11-1/activecss-core-dev-2-11-1.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11839,7 +11839,7 @@ const _getSelector = (o, sel, many=false) => {
1183911839
mainObj = returnEls;
1184011840

1184111841
let moreToDo = false, subAttrActiveID;
11842-
if (mainObj && mainObj.length > 1) {
11842+
if (mainObj && mainObj.length > 1 || remainingSel != '') {
1184311843
// Send back the parent with a data-activeid combo selector for selecting inside. Those attributes get removed after query.
1184411844
let els = mainObj;
1184511845
if (typ == 'closest') {
@@ -11851,12 +11851,12 @@ const _getSelector = (o, sel, many=false) => {
1185111851
selItem = '';
1185211852
for (const el of els) {
1185311853
subAttrActiveID = _getActiveID(el);
11854-
let selItemToAdd = '[data-activeid=' + subAttrActiveID + ']' + remainingSel;
11854+
let selItemToAdd = '[data-activeid=' + subAttrActiveID + '] ' + remainingSel;
1185511855
if (selItem.indexOf(selItemToAdd) === -1) {
1185611856
el.setAttribute('data-activeid', subAttrActiveID);
1185711857
addedAttrs.push(el);
1185811858
if (selItem != '') selItem += ',';
11859-
selItem += '[data-activeid=' + subAttrActiveID + ']' + remainingSel;
11859+
selItem += '[data-activeid=' + subAttrActiveID + '] ' + remainingSel;
1186011860
}
1186111861
}
1186211862
moreToDo = true;

dist/v-2-11-1/activecss-dev-2-11-1.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/v-2-11-1/full-source/prod.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11162,7 +11162,7 @@ const _getSelector = (o, sel, many=false) => {
1116211162
mainObj = returnEls;
1116311163

1116411164
let moreToDo = false, subAttrActiveID;
11165-
if (mainObj && mainObj.length > 1) {
11165+
if (mainObj && mainObj.length > 1 || remainingSel != '') {
1116611166
// Send back the parent with a data-activeid combo selector for selecting inside. Those attributes get removed after query.
1116711167
let els = mainObj;
1116811168
if (typ == 'closest') {
@@ -11174,12 +11174,12 @@ const _getSelector = (o, sel, many=false) => {
1117411174
selItem = '';
1117511175
for (const el of els) {
1117611176
subAttrActiveID = _getActiveID(el);
11177-
let selItemToAdd = '[data-activeid=' + subAttrActiveID + ']' + remainingSel;
11177+
let selItemToAdd = '[data-activeid=' + subAttrActiveID + '] ' + remainingSel;
1117811178
if (selItem.indexOf(selItemToAdd) === -1) {
1117911179
el.setAttribute('data-activeid', subAttrActiveID);
1118011180
addedAttrs.push(el);
1118111181
if (selItem != '') selItem += ',';
11182-
selItem += '[data-activeid=' + subAttrActiveID + ']' + remainingSel;
11182+
selItem += '[data-activeid=' + subAttrActiveID + '] ' + remainingSel;
1118311183
}
1118411184
}
1118511185
moreToDo = true;

src/utils/general/_getSelector.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ const _getSelector = (o, sel, many=false) => {
262262
mainObj = returnEls;
263263

264264
let moreToDo = false, subAttrActiveID;
265-
if (mainObj && mainObj.length > 1) {
265+
if (mainObj && mainObj.length > 1 || remainingSel != '') {
266266
// Send back the parent with a data-activeid combo selector for selecting inside. Those attributes get removed after query.
267267
let els = mainObj;
268268
if (typ == 'closest') {
@@ -274,12 +274,12 @@ const _getSelector = (o, sel, many=false) => {
274274
selItem = '';
275275
for (const el of els) {
276276
subAttrActiveID = _getActiveID(el);
277-
let selItemToAdd = '[data-activeid=' + subAttrActiveID + ']' + remainingSel;
277+
let selItemToAdd = '[data-activeid=' + subAttrActiveID + '] ' + remainingSel;
278278
if (selItem.indexOf(selItemToAdd) === -1) {
279279
el.setAttribute('data-activeid', subAttrActiveID);
280280
addedAttrs.push(el);
281281
if (selItem != '') selItem += ',';
282-
selItem += '[data-activeid=' + subAttrActiveID + ']' + remainingSel;
282+
selItem += '[data-activeid=' + subAttrActiveID + '] ' + remainingSel;
283283
}
284284
}
285285
moreToDo = true;

0 commit comments

Comments
 (0)