Skip to content

Commit

Permalink
Set external libs count to 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCoder committed Feb 19, 2021
1 parent ba2b876 commit e68bb3a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/components/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -610,15 +610,16 @@ BookService BookRepository Receipt Notification
updateExternalLibCount() {
// Calculate no. of external libs
var noOfExternalLibs = 0;
if (!this.state.currentItem.externalLibs) {
return;
}
noOfExternalLibs += this.state.currentItem.externalLibs.js
.split('\n')
.filter(lib => !!lib).length;
noOfExternalLibs += this.state.currentItem.externalLibs.css
.split('\n')
.filter(lib => !!lib).length;
// There is no external libs
// if (!this.state.currentItem.externalLibs) {
// return;
// }
// noOfExternalLibs += this.state.currentItem.externalLibs.js
// .split('\n')
// .filter(lib => !!lib).length;
// noOfExternalLibs += this.state.currentItem.externalLibs.css
// .split('\n')
// .filter(lib => !!lib).length;
this.setState({
externalLibCount: noOfExternalLibs
});
Expand Down

0 comments on commit e68bb3a

Please sign in to comment.