зеркало из https://github.com/mozilla/email-tabs.git
Fix lint errors
This commit is contained in:
Родитель
d984f457f4
Коммит
53939ac274
|
@ -1,3 +1,5 @@
|
|||
/* globals captureText, Readability */
|
||||
|
||||
(function () {
|
||||
const SCREENSHOT_WIDTH = 350;
|
||||
|
||||
|
@ -37,7 +39,7 @@
|
|||
async function onMessage(message) {
|
||||
if (message.type !== "getData") {
|
||||
console.warn("Unexpected message type:", message.type);
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
browser.runtime.onMessage.removeListener(onMessage);
|
||||
let data = {
|
||||
|
|
|
@ -65,12 +65,12 @@ this.emailTemplates = (function () {
|
|||
|
||||
class JustLinks extends React.Component {
|
||||
render() {
|
||||
let tabList = this.props.tabs.map(tab => {
|
||||
let tabList = this.props.tabs.map((tab, index) => {
|
||||
let selection = null;
|
||||
if (tab.selection) {
|
||||
selection = <Fragment>{selectionDisplay(tab.selection)} <br /><br /></Fragment>;
|
||||
}
|
||||
return <Fragment>
|
||||
return <Fragment key={index}>
|
||||
<a href={tab.url}>{tab.title}</a> <br />
|
||||
{ selection }
|
||||
</Fragment>;
|
||||
|
@ -93,7 +93,7 @@ this.emailTemplates = (function () {
|
|||
let hr = index === this.props.tabs.length - 1 ? null : <hr />;
|
||||
readability = <Fragment><div dangerouslySetInnerHTML={{__html: tab.readability.content}} /> { hr }</Fragment>;
|
||||
}
|
||||
return <Fragment>
|
||||
return <Fragment key={index}>
|
||||
<a href={tab.url}>{tab.title}</a> <br />
|
||||
{ selection }
|
||||
{ readability }
|
||||
|
|
|
@ -185,8 +185,8 @@ class TemplateItem extends React.Component {
|
|||
if (this.props.selected) {
|
||||
className += " selected";
|
||||
}
|
||||
return <li className={className} onClick={this.selectTemplate.bind(this)} role="button">
|
||||
{this.props.title}
|
||||
return <li className={className}>
|
||||
<button onClick={this.selectTemplate.bind(this)}>{this.props.title}</button>
|
||||
</li>;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче