Skip to content

Commit

Permalink
Promise<*> for getAmpStateJson
Browse files Browse the repository at this point in the history
  • Loading branch information
samouri committed Jan 15, 2020
1 parent 2946e5d commit a85bfc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/amp-list/0.1/amp-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export class AmpList extends AMP.BaseElement {
* src="amp-state:json.path".
*
* @param {string} src
* @return {Promise<!Object>}
* @return {Promise<*>}
* @private
*/
getAmpStateJson_(src) {
Expand Down Expand Up @@ -593,7 +593,7 @@ export class AmpList extends AMP.BaseElement {
let fetch;
if (this.isAmpStateSrc_(elementSrc)) {
fetch = this.getAmpStateJson_(elementSrc).then(json => {
if (!json) {
if (typeof json === 'undefined') {
user().warn(
TAG,
`No data was found at provided uri: ${elementSrc}`,
Expand Down

0 comments on commit a85bfc2

Please sign in to comment.