dolphindb 3.0.227 → 3.0.229

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/browser.js CHANGED
@@ -3174,9 +3174,9 @@ export class DDB {
3174
3174
  '}\n'),
3175
3175
  ['hello']) */
3176
3176
  async define(definition) {
3177
- const matches = /\bdef (\w+)\s?\(/.exec(definition);
3177
+ const matches = /\bdef (\w+) \(/.exec(definition);
3178
3178
  if (!matches)
3179
- throw new Error(t('DDB.define 方法传入的 definition 不符合函数定义格式'));
3179
+ throw new Error(t('DDB.define 方法传入的 definition 不符合函数定义格式 def xxx ()'));
3180
3180
  const func_name = matches[1];
3181
3181
  // 已定义成功
3182
3182
  if (this.definitions.has(func_name))