fix: 微信登录补充保存username和role
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Agent
2026-04-04 07:35:21 +00:00
parent 756444ef2b
commit d12eea7693
10597 changed files with 817047 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
'use strict';
var $ = require('../internals/export');
var aWeakMap = require('../internals/a-weak-map');
var WeakMapHelpers = require('../internals/weak-map-helpers');
var get = WeakMapHelpers.get;
var has = WeakMapHelpers.has;
var set = WeakMapHelpers.set;
// `WeakMap.prototype.emplace` method
// https://github.com/tc39/proposal-upsert
$({ target: 'WeakMap', proto: true, real: true, forced: true }, {
emplace: function emplace(key, handler) {
var map = aWeakMap(this);
var value, inserted;
if (has(map, key)) {
value = get(map, key);
if ('update' in handler) {
value = handler.update(value, key, map);
set(map, key, value);
} return value;
}
inserted = handler.insert(key, map);
set(map, key, inserted);
return inserted;
}
});