diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -866,8 +866,8 @@ function flameGraph (opts) {
   }
 
   chart.getNodeRect = id => {
-    // returns the node position and size on canvas, or false.
-    return typeof (id) === 'number' && getNodeRect(id)
+    // returns the node position and size on canvas, or null.
+    return typeof (id) === 'number' ? getNodeRect(id) : null
   }
 
   chart.on = dispatch.on.bind(dispatch)
fixing the return value when no node is found