Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fix for #1886 #1897

Merged
merged 2 commits into from
Oct 20, 2012
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/LiveDevelopment/LiveDevelopment.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ define(function LiveDevelopment(require, exports, module) {
}

/** Triggered by a document saved from the DocumentManager */
function _onDocumentSaved() {
var doc = _getCurrentDocument();
function _onDocumentSaved(event, data) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we just use the document passed in the event since DocumentManager always passes it in?
You can simply replace "data" with "doc" and then remove the next line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can make that change. Just thought I would make this "backwards compatible", but if it's only triggered from one place then it won't matter.

var doc = data || _getCurrentDocument(); // use Document passed in with jQuery event if available

if (doc && Inspector.connected() && _classForDocument(doc) !== CSSDocument) {
if (agents.network && agents.network.wasURLRequested(doc.url)) {
Expand Down