Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 21 21:15
    greenkeeper[bot] commented #5237
  • Sep 21 21:15

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Sep 21 21:12
    greenkeeper[bot] commented #5236
  • Sep 21 21:12

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Sep 21 03:58

    greenkeeper[bot] on @octokit

    (compare)

  • Sep 21 03:57

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • Sep 20 21:04
    m-mujica commented #5303
  • Sep 20 20:23
    m-mujica opened #5303
  • Sep 20 20:23

    m-mujica on upgrade-deps

    Update can-type and can-stache-… (compare)

  • Sep 20 20:05
    m-mujica edited #5302
  • Sep 20 20:03
    m-mujica synchronize #5302
  • Sep 20 20:03

    m-mujica on upgrade

    Upgrade routing guide to Can 6 Fix incorrect highlight Use svg images (instead of .png) (compare)

  • Sep 20 19:32
    m-mujica opened #5302
  • Sep 20 19:29

    m-mujica on upgrade

    Upgrade routing guide to Can 6 Fix incorrect highlight (compare)

  • Sep 20 17:42

    m-mujica on upgrade

    WIP: Upgrade (compare)

  • Sep 20 17:06
    do-adams starred canjs/canjs
  • Sep 20 13:34

    chasenlehara on 5119-testing-guide

    Update the Testing guide for Ca… (compare)

  • Sep 20 13:21
    cherifGsoul commented #5295
  • Sep 20 13:18
    cherifGsoul synchronize #5295
  • Sep 20 13:18

    cherifGsoul on update-theme-new-buttons

    Theme pre-release 2 (compare)

Ivo Pinheiro
@ivospinheiro
In can@4 we don't need to hyphenate the properties anymore as we were doing on can@3, right?
Maybe the warning messages needs to be updated
Gregg Roemhildt
@roemhildtg
Correct. No hyphens
Unless you want to set something like data-stuff="...." on the element itself
Kevin Phillips
@phillipskevin
yes, I think that warning message is incorrect
Marc Godard
@MarcGodard

Anyone know this error?

Uncaught TypeError: Cannot read property 'Symbol(can.getKeyValue)' of undefined
    at Object.getKeyValue (get-set.js:78)
    at Behavior.id (map.js:100)
    at Behavior.getInstanceMetaData (store.js:330)
    at Behavior.behavior.(anonymous function) [as updatedInstance] (http://localhost:8080/node_modules/can-connect/constructor/callbacks-once/callbacks-once.js:84:30)
    at Behavior.updatedData (real-time.js:271)
    at Behavior.updateInstance (real-time.js:304)
    at eval (real-time.js:202)

The code causing this is:

    let newItem = new PageItem2()
    newItem.assign(item.serialize())
    newItem.save()
      .then(() => {
        item.destroy()
      })

Everything look fine, and I use this type of code elsewhere (slightly differently) and it works.

qantourisc
@qantourisc
@MarcGodard What would work ?
Marc Godard
@MarcGodard
What do you mean?
@qantourisc ^^
Marc Godard
@MarcGodard
I tried to match how the other code that works works, and still getting the error.
qantourisc
@qantourisc
give me "the other code"
so I can diff it
Marc Godard
@MarcGodard

@qantourisc

  payItem (item) {
    console.log(item)
    console.log(item.serialize())
    this.edit.assign(item.serialize())
    console.log(this.edit)
    console.log(this.edit.serialize())
    this.edit.save()
      .then(returned => {
        console.log(returned)
      })
  },

This is how the other code does it by putting the object on the view Model.

  edit: {
    Type: PageItem2,
    default () {
      return new PageItem2({})
    }
  },

Everything console logs fine. The error happens on the save() call

qantourisc
@qantourisc
I am sorry I am missing tomuch context to help you.
Marc Godard
@MarcGodard
@qantourisc Thanks anyways, I am still working on it.
qantourisc
@qantourisc
ok I am baffled: if I try a { get: function(){} } on mycomponent.viewModel it works. Yet, if I do the same using can.viewModel("mycomponent") it doesn't seem to work. /me ponders hard
qantourisc
@qantourisc
hmmm if I run can.viewModel("modal-invoice")._compuated.mygetter.update() it does work.
So it has issues tracking the dependencies ...
Justin Meyer
@justinbmeyer
Dovid Bleier
@dbleier
getting errors in built main.js can-reflect@1.17.2
  1. complains about nested functions in strict mode
  1. var Map not found
here is an excerpt of what is generated:
/*can-reflect@1.17.2#reflections/shape/shape*/
define('can-reflect@1.17.2#reflections/shape/shape', [
    'require',
    'exports',
    'module',
    'can-symbol',
    '../get-set/get-set',
    '../type/type',
    '../helpers'
], function (require, exports, module) {
    'use strict';
    var canSymbol = require('can-symbol');
    var getSetReflections = require('../get-set/get-set');
    var typeReflections = require('../type/type');
    var helpers = require('../helpers');
    var getPrototypeOfWorksWithPrimitives = true;
    try {
        Object.getPrototypeOf(1);
    } catch (e) {
        getPrototypeOfWorksWithPrimitives = false;
    }
    var ArrayMap;
    if (typeof Map === 'function') {
        ArrayMap = Map;
    } else {
        function isEven(num) {
            return !(num % 2);
        }
        ArrayMap = function () {
            this.contents = [];
        };
Notice the nest isEven function and the typeof Map === 'function' but nowhere is Map defined
Dovid Bleier
@dbleier
and
    module.exports = function makeDelegateEventTree(domEvents) {
        var Delegator = makeDelegator(domEvents);
        return new KeyTree([
            Map,
            Delegator,
            Object,
            Array
        ]);
    };
Ivo Pinheiro
@ivospinheiro
Thanks @justinbmeyer for the quick release.
Now I can try to upgrade the application to can@4 👍
Kevin Phillips
@phillipskevin
what browser are you testing in?
Dovid Bleier
@dbleier
@phillipskevin on the SSSP monitor, which only runs es5
but I am using babel to transpile
and what about the nested function which throws a strict mode error?
Kevin Phillips
@phillipskevin
what throws in strict mode?
Dovid Bleier
@dbleier
the function isEven(num) inside the else clause
also any idea why babel isn't transpiling the ES6 Map?
Kevin Phillips
@phillipskevin
it doesn't transpile globals like that
  1. complains about nested functions in strict mode
can you show what you mean? what is complaining?
  1. var Map not found
why is this a problem?
this code is written specifically to handle the case where Map is not found
Dovid Bleier
@dbleier
it crashes the app
give me min and I'll try to get the errors off the monitor
Kevin Phillips
@phillipskevin
ok thanks
Dovid Bleier
@dbleier
SyntaxError: Functions cannot be declared in a nested block in strict mode undefined:2859
Error loading "package.json!npm" at file:///opt/usr/apps/f36cF3Y1uF/res/wgt/dist/package.json
Error loading "bundles/menuboard-manager/main" at file:///opt/usr/apps/f36cF3Y1uF/res/wgt/dist/bundles/menuboard-manager/main.js
Error evaluating file:///opt/usr/apps/f36cF3Y1uF/res/wgt/dist/bundles/menuboard-manager/main.js
SyntaxError: Functions cannot be declared in a nested block in strict mode
Kevin Phillips
@phillipskevin
ok
Dovid Bleier
@dbleier
Error
line: 33153
message: "Error loading "menuboard-manager@6.4.10#main" at file:///opt/usr/apps/f36cF3Y1uF/res/wgt/dist/src/main.js↵Can't find variable: Map"
if you want I can include the stack trace
Kevin Phillips
@phillipskevin
that one I don't understand