Skip to content

Commit c84d29c

Browse files
committed
expand comment with another option
1 parent 7202f7d commit c84d29c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/kitsu-core/src/components/deattribute.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ function _deattribute(data: ResourceObject): DeattributedResourceObject {
2121
// FIXME: what is the best behaviour when given an invalid attributes key?
2222
// 1. (Current) the same invalid object is returned.
2323
// a. This results in deattribute returning potentially invalid DeattributedResourceObjects
24+
// b. Change the return type to include this scenario. Doing this will possibly cause issues
25+
// down the road in kitsu and kitsu-core
2426
// 2. the object is modified, and has the invalid key removed
2527
// a. This would guarantee valid returns, but will also change the current default behaviour.
2628
// 3. the object is not touched, and an error is thrown

0 commit comments

Comments
 (0)