8000 Update JavaScript/0-complex/application.js · HowProgrammingWorks/Modularity@8b36bdf · GitHub
[go: up one dir, main page]

Skip to content

Commit 8b36bdf

Browse files
committed
Update JavaScript/0-complex/application.js
1 parent d48d0e5 commit 8b36bdf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

JavaScript/0-complex/application.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ require('./lib/unit3')(api, application);
1313
application.reloadUnit = (name) => {
1414
const moduleKey = require.resolve('./lib/' + name);
1515
delete require.cache[moduleKey];
16-
17-
const module = require('./lib/' + name)
18-
typeof module === 'function' && module(api, application);
16+
const module = require('./lib/' + name);
17+
if (typeof module === 'function') module(api, application);
1918
};
2019

2120
application.startWatching = () => {

0 commit comments

Comments
 (0)
0