Skip to content

Commit 44ac7f6

Browse files
committed
Simplify regular expression detection
1 parent 22556d8 commit 44ac7f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/data/store.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ const isAcceptedProcessDeclarationPlugins = (plugins: DeclarationPlugin[]): bool
110110
&& typeof plugin.priority == NUMBER_TYPE
111111
&& Array.isArray(plugin.processors)
112112
&& plugin.processors.every((processor: DeclarationPluginProcessor) =>
113-
({}).toString.call(processor.expr) === '[object RegExp]'
113+
processor.expr instanceof RegExp
114114
&& typeof processor.action === FUNCTION_TYPE
115115
)
116116
);
@@ -272,4 +272,4 @@ const initKeyframesData = (): void => {
272272
store.keyframesRegExp = getKeyFramesRegExp(store.keyframesStringMap);
273273
};
274274

275-
export { store, initStore, initKeyframesData };
275+
export { store, initStore, initKeyframesData };

0 commit comments

Comments
 (0)