Commit ff0e5c1b authored by David Schnur's avatar David Schnur

Move cached hasOwnProperty to the top level.

parent 73baa2b9
......@@ -40,6 +40,10 @@ Licensed under the MIT license.
$("head").prepend("<style id='flot-default-styles'>.flot-tick-label {font-size:smaller;color:#545454;}</style>");
});
// Cache the prototype hasOwnProperty for faster access
var hasOwnProperty = Object.prototype.hasOwnProperty;
///////////////////////////////////////////////////////////////////////////
// The Canvas object is a wrapper around an HTML5 <canvas> tag.
//
......@@ -190,8 +194,7 @@ Licensed under the MIT license.
// Check whether the cache actually has any entries.
var hasOwnProperty = Object.prototype.hasOwnProperty,
cacheHasText = false;
var cacheHasText = false;
for (var key in cache) {
if (hasOwnProperty.call(cache, key)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment