mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 08:31:22 +01:00
fix js-propagate for restarted secondary instances (#4874)
This commit is contained in:
15
loader.js
15
loader.js
@@ -87,21 +87,10 @@ Loader.addWorkerEvents = function(worker) {
|
||||
if (message && typeof message === 'object' && message.action) {
|
||||
switch (message.action) {
|
||||
case 'ready':
|
||||
if (Loader.js.target['nodebb.min.js'] && Loader.js.target['nodebb.min.js'].cache && !worker.isPrimary) {
|
||||
if (Loader.js.target['nodebb.min.js'] && Loader.js.target['acp.min.js'] && !worker.isPrimary) {
|
||||
worker.send({
|
||||
action: 'js-propagate',
|
||||
cache: Loader.js.target['nodebb.min.js'].cache,
|
||||
map: Loader.js.target['nodebb.min.js'].map,
|
||||
target: 'nodebb.min.js'
|
||||
});
|
||||
}
|
||||
|
||||
if (Loader.js.target['acp.min.js'] && Loader.js.target['acp.min.js'].cache && !worker.isPrimary) {
|
||||
worker.send({
|
||||
action: 'js-propagate',
|
||||
cache: Loader.js.target['acp.min.js'].cache,
|
||||
map: Loader.js.target['acp.min.js'].map,
|
||||
target: 'acp.min.js'
|
||||
data: Loader.js.target
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user