mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Change from ES6 Map to old-fashioned object
This fixes the Kokoro tests broken by [] Unfortunately this means that the return type changes from a Map to an Object as well, so all of the .get() lines need to turn into []. Yay weakly typed languages. And apparently in some error conditions this method could already return the Object type anyway, even if you passed in a Map, so it's just poorly designed. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=213808477
This commit is contained in:
parent
399cde1291
commit
ae2c1071f1
4 changed files with 21 additions and 20 deletions
|
@ -48,13 +48,14 @@ registry.Session = function(defaultUri, xsrfToken, contentType) {
|
|||
|
||||
/**
|
||||
* XHR request headers.
|
||||
* @private {!Map.<string, string>}
|
||||
* @private {!Object<string, string>}
|
||||
* @const
|
||||
*/
|
||||
this.headers_ = new Map([
|
||||
['Content-Type', contentType],
|
||||
['X-CSRF-Token', xsrfToken],
|
||||
['X-Requested-With', 'XMLHttpRequest']]);
|
||||
this.headers_ = {
|
||||
'Content-Type': contentType,
|
||||
'X-CSRF-Token': xsrfToken,
|
||||
'X-Requested-With': 'XMLHttpRequest'
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue