ソースを参照

bug: Fixed a crash caused by calling teleportr with incorrect arguments

tags/v0.12.0.22^0
Shaun 9ヶ月前
コミット
37cf7493f8
1個のファイルの変更4行の追加1行の削除
  1. +4
    -1
      src/server/components/social/teleport.js

+ 4
- 1
src/server/components/social/teleport.js ファイルの表示

@@ -2,7 +2,10 @@ module.exports = async (cpnSocial, targetName) => {
const { obj } = cpnSocial;
const { instance: { objects, physics }, syncer } = obj;

const target = objects.find(o => o.name && o.name.toLowerCase().includes(targetName.toLowerCase()));
if (typeof(targetName) !== 'string')
return;

const target = objects.find(o => o.name?.toLowerCase().includes(targetName.toLowerCase()));

if (!target)
return;


読み込み中…
キャンセル
保存