diff --git a/third-party/thrift/src/thrift/lib/cpp2/op/detail/ContainerPatch.h b/third-party/thrift/src/thrift/lib/cpp2/op/detail/ContainerPatch.h index 15d6cdfbc29b4..1dbe8e07ec974 100644 --- a/third-party/thrift/src/thrift/lib/cpp2/op/detail/ContainerPatch.h +++ b/third-party/thrift/src/thrift/lib/cpp2/op/detail/ContainerPatch.h @@ -355,7 +355,7 @@ class MapPatch : public BaseContainerPatch> { /// Ensures that key exists and patches the entry. template FOLLY_NODISCARD VP& ensureAndPatchByKey(K&& key) { - add({{key, {}}}); + tryPutMulti({{key, {}}}); return patchByKey(key); }