Leblender Controllers not compatable with "use strict" javascript mode
When we were bundling All our Javascript together in DependencyHandler.axd, another package was setting javascript to "use strict". This caused Leblender "LeBlender.Dialog.Parameterconfig.Controller" to throw an error on scope.Add : "ReferenceError: newItem is not defined"
Currently:
$scope.add = function () {
newItem = {};
...
Suggested:
$scope.add = function () {
var newItem = {};
...
It ended up generating a new problem for me, whenever I add a new item in my website, the "Update" button does not work, meaning I cannot add it to my site. There's no console error and nothing on the logs.
Have you faced this problem?
Leblender Controllers not compatable with "use strict" javascript mode
When we were bundling All our Javascript together in DependencyHandler.axd, another package was setting javascript to "use strict". This caused Leblender "LeBlender.Dialog.Parameterconfig.Controller" to throw an error on scope.Add : "ReferenceError: newItem is not defined"
Currently: $scope.add = function () { newItem = {}; ...
Suggested: $scope.add = function () { var newItem = {}; ...
Details: Using: 1.0.8.4 Umbraco 7.3.1
Thanks for the fix. I experienced the same and the fix worked for me as well. I put in a PR for it.
https://github.com/Lecoati/LeBlender/pull/55
Glad to see this is now been merged into the codebase and looks to be set to be released for version 1.0.9
I was facing this error in a project and updated parameterconfig.controller.js like this one: https://github.com/Lecoati/LeBlender/pull/55/files
It ended up generating a new problem for me, whenever I add a new item in my website, the "Update" button does not work, meaning I cannot add it to my site. There's no console error and nothing on the logs. Have you faced this problem?
Hi Francielle,
I cant say i have i'm afraid. This fix was merged into leblender version 1.0.9 and is currently in beta, https://www.nuget.org/packages/Lecoati.LeBlender/1.0.9-beta2
If you update to this version do you get the same error?
Many thanks Chris
Hi Chris,
I updated the files and it seems to have solved the problem.
Thank you :)
is working on a reply...