mirror of
https://github.com/google/nomulus.git
synced 2025-07-21 10:16:07 +02:00
Use JSON.parse instead of deprecated goog.json.parse.
Thanks to [] shared libraries at Google now produce valid JSON which allows using JSON.parse. It is safer and faster than goog.json.parse which uses eval by default. NOTE: All shared libraries producing JSON at Google were changed to produce valid JSON. However, if your code uses a custom way of producing JSON (not using the shared libraries) or if your code parses JSON generated a long time ago and stored, this CL might break you so please review with care. Design doc: [] Tested: TAP --sample for global presubmit queue [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=166454709
This commit is contained in:
parent
103b3d7608
commit
4a81236652
5 changed files with 5 additions and 5 deletions
|
@ -165,7 +165,7 @@ registry.registrar.ContactSettings.prototype.sendDelete = function() {
|
|||
throw new Error('Email to delete does not match model.');
|
||||
}
|
||||
var modelCopy = /** @type {!Object}
|
||||
*/ (goog.json.parse(goog.json.serialize(this.model)));
|
||||
*/ (JSON.parse(goog.json.serialize(this.model)));
|
||||
goog.array.removeAt(modelCopy.contacts, ndxToDel);
|
||||
this.resource.update(modelCopy, goog.bind(this.handleDeleteResponse, this));
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue