mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 09:51:26 +00:00
fix warnings
fix warnings in previous codes
This commit is contained in:
@@ -203,7 +203,7 @@ class ContextMenu extends React.Component {
|
||||
<div role="menu" className="seafile-contextmenu dropdown-menu" style={inlineStyle} ref={menu => { this.menu = menu; }}>
|
||||
{this.state.menuList.map((menuItem, index) => {
|
||||
if (menuItem === 'Divider') {
|
||||
return <div key={index} className="seafile-divider dropdown-divider"></div>
|
||||
return <div key={index} className="seafile-divider dropdown-divider"></div>;
|
||||
} else {
|
||||
return (
|
||||
<button
|
||||
|
@@ -7,10 +7,10 @@ class GlobalEventListener {
|
||||
this.callbacks = {};
|
||||
|
||||
if (canUseDOM) {
|
||||
window.addEventListener(MENU_SHOW, this.handleShowEvent);
|
||||
window.addEventListener(MENU_HIDE, this.handleHideEvent);
|
||||
window.addEventListener(MENU_SHOW, this.handleShowEvent);
|
||||
window.addEventListener(MENU_HIDE, this.handleHideEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handleShowEvent = (event) => {
|
||||
for (const id in this.callbacks) {
|
||||
|
Reference in New Issue
Block a user