Skip to content

Commit

Permalink
Fix lint violations for block-scoped-var
Browse files Browse the repository at this point in the history
  • Loading branch information
mroderick committed Oct 8, 2018
1 parent 8192c78 commit 9e3db95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/sinon/util/core/wrap-method.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = function wrapMethod(object, property, method) {
}
}

var error, wrappedMethod, i;
var error, wrappedMethod, i, wrappedMethodDesc;

function simplePropertyAssignment() {
wrappedMethod = object[property];
Expand All @@ -64,7 +64,7 @@ module.exports = function wrapMethod(object, property, method) {

if (hasES5Support) {
var methodDesc = (typeof method === "function") ? {value: method} : method;
var wrappedMethodDesc = getPropertyDescriptor(object, property);
wrappedMethodDesc = getPropertyDescriptor(object, property);

if (!wrappedMethodDesc) {
error = new TypeError("Attempted to wrap " + (typeof wrappedMethod) + " property " +
Expand Down
4 changes: 3 additions & 1 deletion test/issues/issues-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ describe("issues", function () {
}
}

var oldWatch;

try { // eslint-disable-line no-restricted-syntax
var oldWatch = Object.prototype.watch;
oldWatch = Object.prototype.watch;

if (typeof Object.prototype.watch !== "function") {
Object.prototype.watch = function rolex() {}; // eslint-disable-line no-extend-native
Expand Down

0 comments on commit 9e3db95

Please sign in to comment.