Fix some collection issues
This commit is contained in:
parent
94b4744bea
commit
3ae442ee1f
|
@ -56,7 +56,7 @@ export interface SquiggleChartProps {
|
|||
enableLocalSettings?: boolean;
|
||||
/** The project that this execution is part of */
|
||||
project?: SqProject;
|
||||
/** The name of the squiggle execution source. Defaults to "main" */
|
||||
/** The name of the squiggle execution source. Generates a UUID if not given */
|
||||
sourceName?: string;
|
||||
/** The sources that this execution continues */
|
||||
includes?: string[];
|
||||
|
|
|
@ -69,11 +69,13 @@ export const useSquiggle = (args: SquiggleArgs) => {
|
|||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
if (!args.sourceName) args.project.clean(result.sourceName);
|
||||
if (result.needsClean) args.project.clean(result.sourceName);
|
||||
if (args.project.getSource(importSourceName(result.sourceName)))
|
||||
args.project.clean(result.sourceName);
|
||||
};
|
||||
});
|
||||
},
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[]);
|
||||
|
||||
return result;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user