Skip to content

Commit

Permalink
Fix lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
William Chou committed May 21, 2021
1 parent a608ede commit 64637e0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions extensions/amp-list/0.1/amp-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,12 @@ export class AmpList extends AMP.BaseElement {
/**
* A "diffable placeholder" is the child container <div> (which is usually created by the amp-list
* to hold the rendered children). It serves the same purpose as a placeholder, except it can be diffed.
*
*
* For example:
* <amp-list>
* <div placeholder>I'm displayed before render.</div>
* </amp-list>
*
*
* <amp-list diffable>
* <div role=list>I'm displayed before render.</div>
* </amp-list>
Expand All @@ -336,12 +336,12 @@ export class AmpList extends AMP.BaseElement {
* @private
*/
queryDiffablePlaceholder_() {
const roleSelector = this.element.hasAttribute('single-item') ? '' : '[role=list]'
return scopedQuerySelector(
this.element,
// Don't select other special <div> children used for placeholders/fallback/etc.
`> div${roleSelector}:not([placeholder]):not([fallback]):not([fetch-error])`
);
let selector = this.element.hasAttribute('single-item')
? '> div'
: '> div[role=list]';
// Don't select other special <div> children used for placeholders/fallback/etc.
selector += ':not([placeholder]):not([fallback]):not([fetch-error])';
return scopedQuerySelector(this.element, selector);
}

/**
Expand Down

0 comments on commit 64637e0

Please sign in to comment.