浏览代码

refactor: remove redundant error check in invalidate function of useRendererManager (#1023)

- Removed the error check for render mode in the `invalidate` function, as it is no longer necessary. This simplifies the logic and improves code clarity.
Alvaro Saburido 3 周之前
父节点
当前提交
e240079dbb
共有 1 个文件被更改,包括 0 次插入2 次删除
  1. 0 2
      src/composables/useRenderer/useRendererManager.ts

+ 0 - 2
src/composables/useRenderer/useRendererManager.ts

@@ -146,8 +146,6 @@ export function useRendererManager(
    */
   const invalidate = (amountOfFramesToInvalidate = 1) => {
     if (!canBeInvalidated.value) {
-      if (toValue(options.renderMode) !== 'on-demand') { throw new Error('invalidate can only be called in on-demand render mode.') }
-
       return
     }