Merge pull request #8811 from fky2015/patch-1

Fix wrong demo code on `docs/types/mapping-types`.
This commit is contained in:
chriseth 2020-05-01 13:20:03 +02:00 committed by GitHub
commit 5163c09eab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,8 +138,8 @@ the ``sum`` function iterates over to sum all the values.
if (keyIndex > 0)
return true;
else {
self.keys.push();
keyIndex = self.keys.length;
self.keys.push();
self.data[key].keyIndex = keyIndex + 1;
self.keys[keyIndex].key = key;
self.size++;