- {Object.keys(details).map(key =>
- torrent[key] && (
+ {Object.keys(details).map(key => {
+ const val = torrent[key];
+ if (!val) {
+ return null;
+ }
+ if (typeof val === "string" && !val.trim()) {
+ return null;
+ }
+ return (
- {key}
- {details[key](torrent[key])}
- )
- )}
+ );
+ })}