| Index: frog/world.dart
|
| diff --git a/frog/world.dart b/frog/world.dart
|
| index 8fae0ac10ec5794e7f3146907e98961607e5a1f4..520d26d0940f1189e860457a333bfb532e9e79cd 100644
|
| --- a/frog/world.dart
|
| +++ b/frog/world.dart
|
| @@ -229,6 +229,7 @@ class World {
|
|
|
| /** Ensures that identifiers are legal in the generated JS. */
|
| String toJsIdentifier(String name) {
|
| + if (name == null) return null;
|
| if (_jsKeywords == null) {
|
| // TODO(jmesserly): this doesn't work if I write "new Set<String>.from"
|
| // List of JS reserved words.
|
| @@ -245,8 +246,8 @@ class World {
|
| if (_jsKeywords.contains(name)) {
|
| return name + '_';
|
| } else {
|
| - // regexs here? Is it worth checking all names - or just libraries?
|
| - return name;
|
| + // regexs for better perf?
|
| + return name.replaceAll(@'$', @'$$').replaceAll(':', @'$');
|
| }
|
| }
|
|
|
|
|