-
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent
draw
prop from being excluded from the diff
- Loading branch information
Showing
2 changed files
with
5 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
import { PixiReactIgnoredProps } from '../constants/PixiReactIgnoredProps.js'; | ||
import { ReactIgnoredProps } from '../constants/ReactIgnoredProps.js'; | ||
import { gentleClone } from './gentleClone.js'; | ||
|
||
const IGNORED_PROPS = ReactIgnoredProps.concat(PixiReactIgnoredProps); | ||
|
||
/** | ||
* Clones a props object, excluding keys that are special to React and Pixi React. | ||
* | ||
* @param {Record<string, any>} props The props object to clone. | ||
* @param {readonly string[]} additionalIgnoredProps Additional props to ignore. | ||
* @returns {Record<string, any>} The cloned props. | ||
*/ | ||
export function gentleCloneProps(props) | ||
export function gentleCloneProps(props, additionalIgnoredProps = []) | ||
{ | ||
return gentleClone(props, IGNORED_PROPS); | ||
return gentleClone(props, ReactIgnoredProps.concat(additionalIgnoredProps)); | ||
} |