From efc35545c7f5cd36461b26a946d95a69ecba1413 Mon Sep 17 00:00:00 2001 From: petetnt Date: Wed, 28 Jun 2017 16:34:42 +0300 Subject: [PATCH] Fix NavigationProvider throwing errors when doc.file is missing. Fixes #13491 Signed-off-by: petetnt --- .../default/NavigationAndHistory/NavigationProvider.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/extensions/default/NavigationAndHistory/NavigationProvider.js b/src/extensions/default/NavigationAndHistory/NavigationProvider.js index 59e713c823c..07e4cbb12ef 100644 --- a/src/extensions/default/NavigationAndHistory/NavigationProvider.js +++ b/src/extensions/default/NavigationAndHistory/NavigationProvider.js @@ -481,8 +481,10 @@ define(function (require, exports, module) { */ function _handleExternalChange(evt, doc) { if (doc) { - _removeBackwardFramesForFile(doc.file); - _removeForwardFramesForFile(doc.file); + if (doc.file) { + _removeBackwardFramesForFile(doc.file); + _removeForwardFramesForFile(doc.file); + } _validateNavigationCmds(); } } @@ -549,3 +551,4 @@ define(function (require, exports, module) { exports.init = init; }); +