diff --git a/theatre/studio/src/store/stateEditors.ts b/theatre/studio/src/store/stateEditors.ts index d80eff0..66b3a5d 100644 --- a/theatre/studio/src/store/stateEditors.ts +++ b/theatre/studio/src/store/stateEditors.ts @@ -36,7 +36,7 @@ import type { PanelPosition, StudioAhistoricState, } from './types' -import {uniq} from 'lodash-es' +import {clamp, uniq} from 'lodash-es' import { isProject, isSheet, @@ -415,7 +415,11 @@ namespace stateEditors { export function setLength( p: WithoutSheetInstance & {length: number}, ) { - _ensure(p).length = parseFloat(p.length.toFixed(2)) + _ensure(p).length = clamp( + parseFloat(p.length.toFixed(2)), + 0.01, + Infinity, + ) } function _ensureTracksOfObject(