<commit_before>const $ = require('atom').$;
const React = require('atom').React;
const BlameListView = require('../views/blame-list-view');
const RemoteRevision = require('../util/RemoteRevision');
const errorController = require('./errorController');


/**
 * Display or hide a BlameListView for the active editor.
 *
 * If the active editor does not have an existing BlameListView, one will be
 * mounted.
 *
 * @param {Blamer} projectBlamer - a Blamer for the current project
 */
function toggleBlame(projectBlamer) {
  var editorView = atom.workspaceView.getActiveView();
  var editor = editorView.getEditor();
  var filePath = editor.getPath();
<commit_msg>Don't crash for a new unsaved file<commit_after>const $ = require('atom').$;
const React = require('atom').React;
const BlameListView = require('../views/blame-list-view');
const RemoteRevision = require('../util/RemoteRevision');
const errorController = require('./errorController');


/**
 * Display or hide a BlameListView for the active editor.
 *
 * If the active editor does not have an existing BlameListView, one will be
 * mounted.
 *
 * @param {Blamer} projectBlamer - a Blamer for the current project
 */
function toggleBlame(projectBlamer) {
  var editorView = atom.workspaceView.getActiveView();
  var editor = editorView.getEditor();
  var filePath = editor.getPath();

  // An unsaved file has no filePath
  if (!filePath) return;

{'fraction_non_alphanumeric': 0.12713068181818182, 'fraction_numerical': 0.0, 'mean_word_length': 4.591269841269841, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5380646', 'n_tokens_mistral': 405, 'n_tokens_neox': 398, 'n_words': 129}