mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: decorator: check with startWith
This commit is contained in:
1 file changed
+1
-1
@@ -44,7 +44,7 @@ function _descriptor(v: ParamOption<any>) {
|
||||
const originalMethod = obj.value;
|
||||
const val = originalMethod.toString();
|
||||
const firstArg = val.split(')')[0]?.split(',')[0]?.split('(')[1]?.trim() || '';
|
||||
const domainIdStyle = firstArg.toLowerCase().includes('domainid');
|
||||
const domainIdStyle = firstArg.toLowerCase().startsWith('domainid');
|
||||
target.__param[target.constructor.name][funcName] = [];
|
||||
obj.value = function validate(this: Handler, rawArgs: any, ...extra: any[]) {
|
||||
if (typeof rawArgs !== 'object' || extra.length) return originalMethod.call(this, rawArgs, ...extra);
|
||||
|
||||
Reference in new issue
Block a user