[Version 1.0.0-beta.3] Cannot read property 'replace' of undefined

After updating version from 0.20.* to 1.0.0-beta.3, following statement throw the error as title describe, but

var patt =  /\B\$/g;
var Str = '$test';
Str.replace (patt, 'A.B.');

actually it's OK IN 0.20.*

Hi @Qin,

where exactly have you got those statements? In a Function node?

Is there anything else or is that the full function?

Just pasting those three lines into a function node and triggering it doesn't cause any error message for me.

Dear Nick,

Sorry for late reply.
These statement is running in my custom function node.
But it's very very strange, it's okay today. ( I don't know why...)

Uh...I committed an awful gaffe.

Sorry for bother your work.