]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#336] Final formatting issues fixed
authorrwldrn <waldron.rick@gmail.com>
Thu, 24 Feb 2011 17:46:19 +0000 (12:46 -0500)
committerrwldrn <waldron.rick@gmail.com>
Thu, 24 Feb 2011 17:46:19 +0000 (12:46 -0500)
popcorn.js

index f73d3696440d7fca798a92d802fcaa944f226eaa..861e516968f88b1ddbf17fbaff145fd422a34186 100644 (file)
         setup,
         isfn = typeof definition === "function";
 
-    if (!manifest)
-    {
+    //  If `manifest` arg is undefined, check for manifest within the `definition` object
+    //  If no `definition.manifest`, an empty object is a sufficient fallback
+    if ( !manifest ) {
       manifest = definition.manifest || {};
     }
 
-    var pluginFn = function ( setup, options ) {
+    var pluginFn = function( setup, options ) {
 
       if ( !options ) {
         return this;
 
         // Resolves 239, 241, 242
         if ( !options.target ) {
+
+          //  Sometimes the manifest may be missing entirely 
+          //  or it has an options object that doesn't have a `target` property
+
           var manifestopts = "options" in manifest && manifest.options;
+          
           options.target = manifestopts && "target" in manifestopts && manifestopts.target;
         }