Skip to content

Commit

Permalink
added check for an already detached model and data before the watcher…
Browse files Browse the repository at this point in the history
… check
  • Loading branch information
mikedeboer committed Apr 6, 2011
1 parent e01ac53 commit cb3e300
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/ext/watcher/watcher.js
Expand Up @@ -46,9 +46,11 @@ return ext.register("ext/watcher/watcher", {

function checkPage() {
var page = tabEditors.getPage(),
data = page.$model.data,
path = data.getAttribute("path");

data = page.$model.data;
if (!data || !data.getAttribute)
return;

var path = data.getAttribute("path");
if (removedPaths[path]) {
util.question(
"File removed, keep tab open?",
Expand Down

0 comments on commit cb3e300

Please sign in to comment.