소스 검색

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;


불러오는 중...
취소
저장