r59834 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59833‎ | r59834 | r59835 >
Date:18:01, 8 December 2009
Author:tparscal
Status:ok
Tags:
Comment:
Fixed unsafe check for undefined in r59815.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -252,11 +252,11 @@
253253 context.fn = {
254254 'trigger': function( name, event ) {
255255 // Event is an optional argument, but from here on out, at least the type field should be dependable
256 - if ( event == undefined ) {
 256+ if ( typeof event == 'undefined' ) {
257257 event = { 'type': 'custom' };
258258 }
259259 // Ensure there's a place for extra information to live
260 - if ( event.data == undefined ) {
 260+ if ( typeof event.data == 'undefined' ) {
261261 event.data = {};
262262 }
263263 // Allow filtering to occur

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59815Added some handling for the event argument of trigger to be optional.tparscal01:11, 8 December 2009

Status & tagging log