Browse Source

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 weeks ago
parent
commit
e240079dbb
1 changed files with 0 additions and 2 deletions
  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) => {
   const invalidate = (amountOfFramesToInvalidate = 1) => {
     if (!canBeInvalidated.value) {
     if (!canBeInvalidated.value) {
-      if (toValue(options.renderMode) !== 'on-demand') { throw new Error('invalidate can only be called in on-demand render mode.') }
-
       return
       return
     }
     }