Please check if the PR fulfills these requirements
[x] It's the right issue type on the title
[x] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
[x] The commit message follows our guidelines
[x] Tests for the changes have been added (for bug fixes/features)
[x] Docs have been added/updated (for bug fixes/features)
[x] It does not introduce a breaking change or has a description of the breaking change
Description
1) navigator.platform 속성은 deprecated 된 상태이기 때문에, 대체 속성인 navigator.userAgent를 사용했습니다.
2) navigator 객체는 브라우져 속성이기 때문에, ssr 환경에서 editor를 불러오면 undefined 한 타입 에러가 납니다. 이에 앞에 브라우져 환경에서만 속성에 접근할 수 있도록 조치하였습니다.
3) test 함수는 string 타입의 인자를 받는데, undefined한 값이 들어가면 안되기에 index로 고려하는 기능을 제안합니다. 하지만 이미 앞에서 undefined 하지 않을 경우에만 통과하기 때문에 뒤 검증 로직은 test, match, indexOf 아무거나 사용해도 무방할 것 같습니다.
Thank you for your contribution to TOAST UI product. 🎉 😘 ✨
Please check if the PR fulfills these requirements
fix #xxx[,#xxx]
, where "xxx" is the issue number)Description
1)
navigator.platform
속성은deprecated
된 상태이기 때문에, 대체 속성인navigator.userAgent
를 사용했습니다.2)
navigator
객체는 브라우져 속성이기 때문에, ssr 환경에서 editor를 불러오면undefined
한 타입 에러가 납니다. 이에 앞에 브라우져 환경에서만 속성에 접근할 수 있도록 조치하였습니다.3)
test
함수는string
타입의 인자를 받는데,undefined
한 값이 들어가면 안되기에 index로 고려하는 기능을 제안합니다. 하지만 이미 앞에서undefined
하지 않을 경우에만 통과하기 때문에 뒤 검증 로직은 test, match, indexOf 아무거나 사용해도 무방할 것 같습니다.Thank you for your contribution to TOAST UI product. 🎉 😘 ✨