문제

The realtime api documentation indicates that the set method of CollaborativeMap should return the previous value at the given key, if there is one. Instead, it seems to return some object that has the old value as a property.

var map = doc.getModel().createMap();
map.set('key', 'val');
var oldValue = map.set('key', 'val2');
console.log(oldValue === 'val1'); // false
console.log(oldValue); // Tm {a: ""val"", Pa: Object, K: function, pa: function, J: function…}
도움이 되었습니까?

해결책

It looks like an internal data structure in the Realtime API is being returned instead of the intended value. Thanks for reporting this issue - we're looking into it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top