我发现错误,在fallbackResult上无法读取null的属性'renderError'

问题描述 投票:0回答:1
import makeups from './makeups.js';

类数据源{静态构成(关键字){返回fetch(http://makeup-api.herokuapp.com/api/v1/products.json?product_type=${keyword}).then(response => {返回response.json()}).then(responseJson => {if(responseJson.arrray){返回Promise.resolve(responseJson.array);}其他{返回Promise.reject(${keyword} is not found)}})}}

导出默认数据源;

javascript render fallback
1个回答
0
投票
this a error ini browser

从'./makeups.js'导入化妆品;

类数据源{静态构成(关键字){返回fetch(http://makeup-api.herokuapp.com/api/v1/products.json?product_type=${keyword}).then(response => {返回response.json()}).then(responseJson => {if(responseJson.arrray){返回Promise.resolve(responseJson.array);}其他{返回Promise.reject(${keyword} is not found)}})}}

导出默认数据源;

© www.soinside.com 2019 - 2024. All rights reserved.