unpoly-rails 3.7.2 → 3.7.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@
5
5
  /***/ (() => {
6
6
 
7
7
  window.up = {
8
- version: '3.7.2'
8
+ version: '3.7.3'
9
9
  };
10
10
 
11
11
 
@@ -4055,6 +4055,7 @@ up.FragmentProcessor = class FragmentProcessor extends up.Record {
4055
4055
  /* 45 */
4056
4056
  /***/ (() => {
4057
4057
 
4058
+ const u = up.util;
4058
4059
  const DESCENDANT_SELECTOR = /^([^ >+(]+) (.+)$/;
4059
4060
  up.FragmentFinder = class FragmentFinder {
4060
4061
  constructor(options) {
@@ -4082,13 +4083,16 @@ up.FragmentFinder = class FragmentFinder {
4082
4083
  return up.fragment.closest(this._origin, this._selector, this._options);
4083
4084
  }
4084
4085
  _findDescendantInRegion() {
4085
- let parts = this._selector.match(DESCENDANT_SELECTOR);
4086
- if (parts) {
4087
- let parent = up.fragment.closest(this._origin, parts[1], this._options);
4088
- if (parent) {
4089
- return up.fragment.getDumb(parent, parts[2]);
4086
+ let simpleSelectors = up.fragment.splitTarget(this._selector);
4087
+ return u.findResult(simpleSelectors, (simpleSelector) => {
4088
+ let parts = simpleSelector.match(DESCENDANT_SELECTOR);
4089
+ if (parts) {
4090
+ let parent = up.fragment.closest(this._origin, parts[1], this._options);
4091
+ if (parent) {
4092
+ return up.fragment.getDumb(parent, parts[2]);
4093
+ }
4090
4094
  }
4091
- }
4095
+ });
4092
4096
  }
4093
4097
  _findFirst() {
4094
4098
  return up.fragment.getDumb(this._document, this._selector, this._options);