leshill / handlebars_assets

Use handlebars.js templates with the Rails asset pipeline.
MIT License
647 stars 159 forks source link

Uncaught TypeError: Cannot assign to read only property 'partial' of <partial name> #123

Closed dougfarre closed 9 years ago

dougfarre commented 9 years ago

I upgraded my rails project from 4.1.8 to 4.2.0 and now I have this error: Uncaught TypeError: Cannot assign to read only property 'partial' of on the line below

     options.partial = true;

__exports__.resolvePartial = resolvePartial;function invokePartial(partial, context, options) {
options.partial = true;

if(partial === undefined) {
  throw new Exception("The partial " + options.name + " could not be found");
} else if(partial instanceof Function) {
  return partial(context, options);
}

}

Any suggestions on how to troubleshoot this so I can provide more information would be greatly helpful. I don't even know where to begin.

AlexRiedler commented 9 years ago

@dougfarre did your handlebars_assets version also update? What version of gems? any other info would be greatly appreciated. (e.g. what options you are using).

dougfarre commented 9 years ago

Sorry. Im using handlebars_assets 0.20.0 I'm not sure what you mean by other options. I can post my Gemfile.lock if that would be helpful.

Thanks for your help.

dougfarre commented 9 years ago

@AlexRiedler I just manually updated the gem to 0.20.1 and now it is working. Thanks for your help.

AlexRiedler commented 9 years ago

@dougfarre okay awesome, I was trying to think about it what could be happening. Thanks for the update!