1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-28 17:20:13 +02:00

add check on externalLibs before using

This commit is contained in:
Kushagra Gour
2018-06-22 20:35:18 +05:30
parent 0eec8bec91
commit f7c926e68a
2 changed files with 20 additions and 13 deletions

View File

@@ -513,6 +513,9 @@ export default class App extends Component {
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;