BufferGeometry.toNonIndexed() warns about `BufferGeometry is already non-indexed`

Some functions such as BufferGeometryUtils.toCreasedNormals() call BufferGeometry.toNonIndexed() to convert possibly indexed geometries to non-indexed ones.
They do not check whether a geometry is already non-indexed.

It seems that BufferGeometry.toNonIndexed() should not be called when the geometry is not indexed, producing this warning:

THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.
toNonIndexed @ three.module.js:10964
toCreasedNormals @ BufferGeometryUtils.js:1240

In this case and contrary to documentation, no new geometry is returned but this geometry, which may be the reason for the warning, and the functions that trigger such a warning would be working on the original geometry, not on a non-indexed copy.

What would a correct use of BufferGeometryUtils.toCreasedNormals() and BufferGeometry.toNonIndexed() look like?

toCreasedNormals() is also used by e.g. React Three Drei’s <RoundedBox> and triggers the warning out of the box.

Changing toCreasedNormals to only call toNonIndexed if the geometry is indexed would be a fine change imo. Feel free to make a PR!

Thanks for your input.
I created a PR in three-stdlib, maybe you can have a look at it.

I opted for the simplest solution which will just skip the call and update the provided geometry in-place & return it.