# Conditions for call of DefineMap.prototype.setup?

**URL:** <https://forums.bitovi.com/t/conditions-for-call-of-definemap-prototype-setup/818>\
**Category:** CanJS\
**Created:** [March 9, 2018, 1:26pm UTC](https://forums.bitovi.com/t/conditions-for-call-of-definemap-prototype-setup/818 "2018-03-09T13:26:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BairDev](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/bairdev/32/295_2.png) [@BairDev](https://forums.bitovi.com/u/BairDev)\
**Post date:** [March 9, 2018, 1:26pm UTC](https://forums.bitovi.com/t/conditions-for-call-of-definemap-prototype-setup/818/1 "2018-03-09T13:26:10Z")

</div>

We are actually still updating CanJS in our projects from v2 to v3 and now to v4, so we want to get rid of the good old `CanMap` (not using `.attr` and _define_ and stuff anymore). When trying to use `DefineMap` I could not see a call of `setup`.

But an important change like this (_setup_ is abandoned in DefineMap) is not mentioned in the [migration path document](https://canjs.com/doc/migrate-3.html) and this method is mentioned also in the discussion of the [_init topic_](https://forums.bitovi.com/t/using-init-on-definemap/814).

So sorry for the maybe stupid question, but what am I [doing wrong here](https://jsfiddle.net/bair_web/w6c6mj5r/)?

---

<div class="post-metadata">

**Author:** ![justinbmeyer](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/justinbmeyer/32/179_2.png) [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Post date:** [March 9, 2018, 9:34pm UTC](https://forums.bitovi.com/t/conditions-for-call-of-definemap-prototype-setup/818/2 "2018-03-09T21:34:28Z")

</div>

You aren’t really doing anything wrong. Setup not working was a oversight while trying to optimize DefineMap. Can you use init instead?

I can make setup work if you create an issue.

---

<div class="post-metadata">

**Author:** ![BairDev](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/bairdev/32/295_2.png) [@BairDev](https://forums.bitovi.com/u/BairDev)\
**Post date:** [March 12, 2018, 8:25am UTC](https://forums.bitovi.com/t/conditions-for-call-of-definemap-prototype-setup/818/3 "2018-03-12T08:25:41Z")

</div>

Thanks for your answer. Using `init` works quite well. It is called synchronously, isn’t it?

We will check this thoroughly for our migration and might run into troubles, because `init` does not take any argument (right?).

So maybe we come back here later.
