Yuki Takei 6 лет назад
Родитель
Сommit
67992cf1e5

+ 1 - 1
src/client/js/components/Admin/ImportData/ErrorViewer.jsx

@@ -12,7 +12,7 @@ class ErrorViewer extends React.Component {
     const { errors } = this.props;
 
     let value = '(no errors)';
-    if (errors != null) {
+    if (errors != null && errors.length > 0) {
       const lines = errors.map((obj) => {
         return JSON.stringify(obj);
       });

+ 4 - 1
src/client/js/components/Admin/ImportData/GrowiZipImportItem.jsx

@@ -160,7 +160,10 @@ export default class GrowiZipImportItem extends React.Component {
       <div className="w-100 text-center">
         <span className="text-info"><strong>{insertedCount}</strong> Inserted</span>,&nbsp;
         <span className="text-success"><strong>{modifiedCount}</strong> Modified</span>,&nbsp;
-        <a className="text-danger" role="button" onClick={this.errorLinkClickedHandler}><u><strong>{errorsCount}</strong> Failed</u></a>
+        { errorsCount > 0
+          ? <a className="text-danger" role="button" onClick={this.errorLinkClickedHandler}><u><strong>{errorsCount}</strong> Failed</u></a>
+          : <span className="text-muted"><strong>0</strong> Failed</span>
+        }
       </div>
     );