Skip to content

Commit

Permalink
Update transform_files.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Oct 31, 2022
1 parent 5a04341 commit 1d555ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/transform_files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,6 @@ function transformClass(type, raw, options = {}) {
}
} while (transformed !== body);

body = body.replace(/fabric\.Object/gm, 'FabricObject');

const finalName =
type === 'mixin'
? `${_.upperFirst(name)}${className.replace(
Expand Down Expand Up @@ -322,6 +320,10 @@ function transformClass(type, raw, options = {}) {
.replace(/\s*\)\s*;?/, '')}`;
}

rawFile = rawFile
.replace(new RegExp(namespace.replace(/\./g, '\\.'), 'g'), name)
.replace(/fabric\.Object/g, 'FabricObject');

if (_.size(defaultValues) > 0) {
const defaultsKey = `${_.lowerFirst(name)}DefaultValues`;
rawFile +=
Expand Down

0 comments on commit 1d555ad

Please sign in to comment.