我将 Composer 文件中的 PHP 包名称从"name": "author/author-php"改为"name": "author/author"did composer install& composer update,将我的更改与 master 合并,然后创建了一个版本。
但是在 Packagist 上更新库后,新名称不起作用,composer 找不到它,composer require author/author我什至无法下载这个新版本。
注意:repo 名称仍然author-php如此,这是 Packagist 没有重命名的原因吗?
我在我的ReactJS应用程序中得到了这个错误,它提取了数据.在我看来,错误显示何时map()指向null
TypeError:无法读取未定义的属性"map"
我无法想出一种制作默认值的方法
这是代码:
import React, {Component} from 'react';
// This component is for search list view, it render the props places data,
// And handle cilck for place item.
class SearchList extends Component {
render() {
// const {places, query, selectPlace} = this.props;
const {places,query,selectPlace} = this.props;
return (
<div className="container">
<hr/>
<div className="input-group">
<input
type="text"
className="form-control"
placeholder="Filter"
aria-label="Filter Input"
onChange={(event) => {
query(event.target.value);
}}
/>
<span className="input-group-addon">
<i className="fas fa-filter"></i>
</span>
</div>
<hr/>
<div style={{maxHeight: …Run Code Online (Sandbox Code Playgroud)