mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
Fix ShardClientUtil#broadcastEval - now really accepting functions (#2248)
* small fix to broadcastEval accepting functions * dont ignore idea anymore (separate PR then)
This commit is contained in:
parent
351f5f7209
commit
42c0e50c92
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ class ShardClientUtil {
|
|||
*/
|
||||
broadcastEval(script) {
|
||||
return new Promise((resolve, reject) => {
|
||||
script = typeof script !== 'function' ? `(${script})(this)` : script;
|
||||
script = typeof script === 'function' ? `(${script})(this)` : script;
|
||||
const listener = message => {
|
||||
if (!message || message._sEval !== script) return;
|
||||
process.removeListener('message', listener);
|
||||
|
|
|
|||
Loading…
Reference in a new issue