diff --git a/include/yaml-cpp/node/impl.h b/include/yaml-cpp/node/impl.h index 26cccbd..d711527 100644 --- a/include/yaml-cpp/node/impl.h +++ b/include/yaml-cpp/node/impl.h @@ -149,7 +149,7 @@ inline const T Node::as() const { template inline const T Node::as(const S& fallback) const { if (!m_isValid) - throw InvalidNode(); + return fallback; return as_if(*this)(fallback); }