Skip to content

Commit 5412f8d

Browse files
spahnkeoliverbock
andauthored
Invert if statement
Co-authored-by: oliverbock <[email protected]>
1 parent c710a90 commit 5412f8d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Source/Noesis.Javascript/JavascriptExternal.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ JavascriptExternal::JavascriptExternal(System::Object^ iObject)
5959
JavascriptExternal::~JavascriptExternal()
6060
{
6161
mObjectHandle.Free();
62-
if (mPersistent.IsEmpty())
63-
return;
64-
mPersistent.ClearWeak<void>();
65-
mPersistent.Reset();
62+
if (!mPersistent.IsEmpty()) {
63+
mPersistent.ClearWeak<void>();
64+
mPersistent.Reset();
65+
}
66+
6667
}
6768

6869
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -401,4 +402,4 @@ void JavascriptExternal::IteratorNextCallback(const v8::FunctionCallbackInfo<Val
401402

402403
} } // namespace Noesis::Javascript
403404

404-
////////////////////////////////////////////////////////////////////////////////////////////////////
405+
////////////////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)