Solved! Go to Solution.
extGraphics = GraphicsUtils.graphicsExtent(resultFeatures); map.setExtent(extGraphics);
extGraphics = GraphicsUtils.graphicsExtent(resultFeatures); map.setExtent(extGraphics);
you can try this. It is written in AMD mode, so make sure you add "esri/graphicsUtils" in your require function parameters, and give it a local name "GraphicsUtils".extGraphics = GraphicsUtils.graphicsExtent(resultFeatures); map.setExtent(extGraphics);